Posts

Showing posts from August, 2012

python - Specifying an exit function for an abstract function -

मुझे फ़ंक्शन को एक सार विधि से कॉल करने की आवश्यकता है, अर्थात class A (वस्तु): @ abc.abstractmethod डीईएफ़ Method1 (स्वयं): अपवाद बढ़ा ( "लागू नहीं किया गया विधि") डीईएफ़ Method2 (स्वयं): प्रिंट वर्ग बी (ए) "Method1 समाप्त हो गया": डीईएफ़ Method1 (स्वयं): प्रिंट "से Method1 क्रियान्वित क्लास बी " मुझे method1 के बाद वर्ग ए को स्वचालित रूप से कॉल करने की आवश्यकता है I को निष्पादित किया गया है (यह कक्षा ए पक्ष पर किया जाना चाहिए - स्वतंत्र रूप से विरासत में मिली कक्षाओं से)। क्या ऐसा करने का एक अच्छा तरीका है? आप metaclass का उपयोग कर सकते हैं, जो कक्षा बनाते समय method1 को लपेटता है: मिक्ट कूल आयात से वर्ग मेटा (प्रकार): डीईएफ़ __ एनयूयू (मेटा, नाम, कुर्सियां, एट्र) आती है: method1 = attr ['method1'] अगर नहीं मिलता है attr (विधि, '__isabstractmethod__'): @wraps (Method1) डीईएफ़ आवरण (स्वयं, * args, ** kw): रेस = Method1 (स्वयं, * args, ** kw) self.method2 () वापसी रेस attr [ ' Method1 '] = आवरण वापसी सुपर

sql - How to improve CROSS JOIN request memory consumption -

For simulation purposes, I need to randomly create rows in the table. I have potential A, Table A and Probability The table of potential events with the column B is. Make Table Systemation (generated as a primary key hash generated by Achievement Inkjer Infhenge); Create table B events (EventIIT Integer defaults by default as primary key hash, Event Probleme Decimal (13,10) Null;) In order to create events, I use a cross-join request: set as a table generated Avent (SELECT SituationId, from EventId (SELECT SituationId, EventId, RAND) () * 100 A Generation Perfection, Event Probability for Citizen's Cross Join Events) where Generation Probability and LT; Event probability); I am using the H2 database only in memory mode (i.e., with the following URL: jdbc: h2: mem: db) and the problem is that in the table of conditions approximately 72k rows and Rows in the 600 event table, I'm running out of memory of JVM, I am using Memory mode to be able to run several JVMs in

php - Return greek characters from MySQL to Javascript -

I am trying to create a form that is used to get value from a MySQL table of JQuery Autocompletion Uses I am very new to javascript and ajax, but I got it to work. When I type 1 letter in the input field, I get an E drop-down list with values ​​matching the table. It works fine with normal character (AZ, 1- 9). However, I have a table with the following value: 10 ng 100 ng 1 μg < P> The last one is giving me problems because it has a Greek character when I write '1', then it should return all 3 values ​​in the drop-down menu. Instead it does not return anything when I type '10', then it returns the first value before it is expected. <$ (function () {$ ("" .jax_getid _ ") each (function () {(function ($ this) {$ this.autocomplete ({feedback: function (event, Ui) {try {if (ui.content.length === 0} {$ ("#" + Event.target.id + "- empty message"). Text ("no result found");} and { $ ("#" + Event.tar

ios - Overlay area stays on top after searching a list UIView -

Image
I have a UIView with a list of items when I click on the search bar then the keyboard comes up and the rest The screen has a gray overlay. When I'm on Gray Overlay If I click, the keyboard disappears, though the overlay area remains on the top and is not missing. What is the root cause of this problem? How can I solve it? itemprop = "text"> Check it after: - Write in this console: - By giving a breakpoint to the View Controller Po [self.view subviews] (id) $ 1 = 0x0a3155f0 & lt; __ NSArrayM 0xa3155f0 & gt; (& Lt; AtshadowTableView: 0xc341600; baseClass = UITableView; frame = (0 44, 320 411); clipsToBounds = Yes; gestureRecognizers = NSArray: 0xa627200 & gt;; layer = & lt; CALayer: 0xa626d30 & gt;; ContentOffset: {0, 0} & gt;, & lt; UISearchBar: 0xa618f40; frame = (0; 32044); text = ''; layer = & lt; calyayer: 0xa619040 & gt; & gt; & lt ; UIControl: 0xa329fc0; frame = (0 44, 320 455); alpha = 0

Outlook PowerShell script does not retrieve latest email -

I have a script that reads an Outlook folder for e-mail, selecting the most recently received email , And saves its attachment in a directory. It does not work properly - It seems that it only knows what email I receive, if I open Outlook before running the script - otherwise, it thinks that the most recent The email received is only that Is there any way to refresh Outlook to refresh before scanning the script? My code is below: $ filepath = $ args [0] $ account = $ args [1 ] & Lt; ## File Path $ filepath = "I: \ folder" $ account = "Account@host.com" ## #set approach $ o = to open new object-conebiz Outlook. App $ n = $ o.GetNamespace ("MAPI") $ account = $ n. Folter | ? {$ _. Name-EC $ account}; $ Inbox = $ account.Folders | ? {$ _. Name-mail 'inbox'}; $ Data = INBox.Folders | ? {$ _. Name-match 'data'}; $ F = $ Data.Folders | ? {$ _. Name-mail 'MyTargetFolder'}; $ Email = $ f.Items | Sort-object receive-time-de

opengl es - Does Dalvik use native library in Android? -

I read a lot of articles about it, but clearly can not understand a very important issue. So, for example, I wrote a program (in Java) that compiled my program to run in Dualvic after using the ODAGL API (the package included in this API package). And how does this byte code communicate with openges. When does this communication appear? Correct me if I am wrong because the following is just an estimate: The Android Framework has been sent with a set of Java Classes, which implements OpenGL functionality. This Java class will only call the native OpenGL function through JNI, thus, taking advantage of the original OpenGL libraries. If you look at Android Framework sources, you can see the following: public class GLES20 {public static origin zero glClearColor (float red, float green, float Blue, float alpha); // C function zero glider path (GLclamph depth) public static basic zero glider path (float depth); // C function zero glove stencil (GLINTS) public static core zero

selenium - Chrome: fake microphone input for test purpose -

For testing purposes with the launcher, I need to simulate the audio input without a microphone with a microphone. I With the "Fake-imitation-device-of-media-stream" flag, Chrome can simulate a fake microphone. However, no input from the fake microphone is coming, so my test fails. Is it possible to simulate the sound that is exiting the microphone? Thank you! I use duplicate video and microphone input two chrome flags < P> - Use-duplicate-device - Use-duplicate-you-can-media-stream Try one with two flags together.

javascript - Dropdown menu for navigation on site HTML and CSS only -

This is my site - - If you click on "Service" at the top, you will see that it creates the whole NAV The bar has come down I want to see it this way - -. Here's the script: & lt; Script & gt; $ (Document) .ready (function () {$ ("# flip") Click (function () {$ ("# panel"). Slide Toggle ("Slow");});}); & Lt; / Script & gt; And here is HTML: & lt; Div id = "flip" & gt; Services & lt; / Div & gt; & Lt; Div id = "panel" & gt; & Lt; Div id = "inside" & gt; & Lt; A href = "http://www.todddudley.com.com/" & gt; Logo Design & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; Can you help? I only want to use HTML and CSS but I will use javascript, as I did here. Thank you! "- Example -" is a link This horizontal menu css and html Only

Draggable points in Javascript chart -

I'm searching for a JavaScript Chart library. I want a draggable point in a line chart, so the user can edit the value in the chart. Is there anyone other than the High Churches? I found really great for graphing (like), but not for charts. Any ideas / ideas? Thank you! The RGRF line chart is adjustable:

javascript - Angular Data updating -

Good afternoon I am developing a project with angular JS and I have a list of the page on which the update GPS Smartphone coordinates gets I am when I am always on the same page, everything works fine and the page is updated with the correct objects But when I turned on a separate page Go back to the page with the list then the data is updated in the model (checked with console - log -> array has items) but then the list is still empty when you view the web page HTML page (list) from snippet & lt; Label class = "item item-radio" ng-repeat = "projects projects lateness" & gt; & Lt; Input type = "radio" name = "project" ng-model = "info.currentProject" ng-value = "project.id" & gt; & Lt; Div class = "item-content" & gt; {{Project.name}} - {{project.customer}} & lt; / Div & gt; & Lt; I class = "radio-icon ion-check mark" & gt; & Lt; / I & gt; &

php - edit textbox value in magento -

I'm new to Magenta Extension developments. On clicking I have to change my textbox value on the button, the following in Magenta are some important part of my code. When this is the same I try in simple PHP, why not work in Magenta ? My script is: & lt; Script type = "text / javascript" & gt; Function changeText2 () {var street = document.getElementById ('street_1'). Values; Var city = document. GetElementById ('city'). value; Var state = document.getElementById ('region'). value; Var zip = document.getElementById ('zip'). Values; Var newcity = document.getElementById ('newcity'). value; Document.getElementById ('city') innerHTML = Newcity. Confirm Return (City); Back true; } & Lt; / Script & gt; This button is the code: & lt; Div class = "field" & gt; & Lt; Label = "city" class = "required" & gt; & Lt; Em> * & Lt; / Em> & Lt ;?

c# - Refer Object's Property by string -

Is it possible to call the property's property by its key name? I want to update the user's profile Data in the cookie, so I have the following code bool propertyChanged = false; UserProfile ThisUserProfile = context.UserProfiles.Single (U = & gt; u.Id == int.Parse (GetCookieValue (UserIdString)); If (this user profile.property1! = GetCookieValue ("Property1")) {ThisUserProfile.Property1 = GetCookieValue ("property1") PropertyChanged = true} (ThisUserProfile.Property2! = GetCookieValue ("Property2")) {ThisUserProfile.Property2 = GetCookieValue ( "property 2") property Chenjed = true} if (it Usrprofailkproprti 3! = GetCookieValue ( "Property3")) {ThisUserProfile.Property3 = GetCookieValue ( "Property3") PropertyChanged = true} // and many more properties ..... if (property changed) references Save Changes (); Is it possible to type the method to update the property object as the following? Zero Update

Are these 2 capabilities supported in Safari extension development? -

I wrote a Chrome / Opera extension and I'm considering porting it to Safari It requires 2 special abilities and in the absence of this, either the whole plan will have to veto Ability to read HTTPS URL - Chrome "Tab" It supports this as part of the permit. Firefox (the last time I checked). The ability to dynamically change the appearance of the activation button. - In Chrome, this is achieved by having a single canvas (i.e. buttons) on the background page ... ---- -canvas id = "button_canvas" width = "19 "Height =" 19 "- - / canvas - / / body - ... and then dynamically required when changing it ... var canvas = document.getElementById ("button_canvas"); Var Context = Canvas Gate Contact ("2D"); Var image data = context.getImageData (0, 0, 19, 19); // Write the luggage in the canvas context. Input image data (image data, 0, 0); ImageData = context.getImageData (0, 0, 19, 19); // key element below

load django templatetags from custom location -

I'm trying to load custom templatetags the nonstandard location , ie. project.myapp.templatetags > project.myapp.extra_level.templatetags . I can load them globally on the django.template.base.add_to_builtins but that's just bad behavior of IMHO. django.template.base import add_to_builtins from add_to_builtins .custom_tags using ( 'myapp.extra_level.templatetags') Unfortunately, as "TEMPLATE_DIRS" a setting does not exist, so I like that a choice had to be creative saving a life :) first consider and load_all_installed_template_libraries to a similar use Django.contrib.admindocs.views and loaded in your settings, but of course I have "RuntimeError: Application registry installed so far No " Another idea project.myapp .__ init __ (for all those templatetag libraries are where project.myapp.extra_level.templatetags ), but based on loading files templatetag libraries. Any way to achieve this goal? Maybe I can in some wa

utf 8 - MySQL truncates latin-1 data when inserting to UTF-8 column. How to get an error? -

OK, there was a problem when I was trying to insert a string that came in UTF-8 format when Actually Latin was -1. The problem was that the behavior varies between different servers: Windows will return an error when a non-UTF8 char: "Wrong string value: '\ xD1OL S .... For the column [...] " Linux will quietly add to whatever it gives until it first likes it, and then the rest For once, I think the behavior of windows is one that I want. I see no option to make and make mysql Linux server even more difficult. Now you are of one. Thank you !. OK, it was quick to have the problem, we had a 5.6 Linux server that was not in strict mode It was, however, that our DBA assured me that it was, so that we think it was a Linux problem. Therefore, just activate STRICT_ALL_TABLES . Here's how to enable MySQL mode and how to:

sql server 2008 r2 - Cumulative Sum of week sales -

select weekly report report Data ID, Item ID, Store ID, Manufacturer Vacancy Ashokide, Weeksell, WKYR, Sam (Weeksal ManufacturerRetailerAssocId Order by YTD from WeeklyReportDetailsData as ItemID, StoreId, WeekSales, WeeklyReportDetailsDataId, WKYR, by ManufacturerRetailerAssocId Order by ManufacturerRetailerAssocId = 10 Group (from ManufacturerRetailerAssocId ROWS) in the previous and existing lines of Item ID, StoreId, Itemid, StoreId, WeeklyReportDetailsDataId, Itemid, StoreId, ManufacturerRetailerAssocId, WKYR I'm getting the error that the wrong syntax near the ballast Please help !!!!!! change current lines to current line . Your error should be resolved! Edit: Your comment mentions that you are on 2008 R2 indicates that you do not have the ability to use Please enter over () for the SQL Server and

SQL Server send email if no record is inserted in last hour -

I hope every record will be put per hour in the table. I want to be able to monitor that table and if the last If no record is included in the hour, an email alert should be sent to me. What is the easiest / best solution? Batch running, monitoring device or something else? Step 1) Create profile and account Use the Configure Database Mail Wizard By configuring database mail node in the management node which will create profile and account, the database can be accessed from the mail context menu. This wizard account, profile and database mail is used to manage global settings Step 2) Run : sp_CONFIGURE 'Advanced Show', 1GO RECONFIGURE GO Sp_CONFIGURE 'Database Mail XPs', 1 GO RECONFIGURE GO Step 3) Use msdb GO EXEC @ PROFILE_NAME = sp_send_dbmail 'yourprofilename', @ recipients = 'Test @ example.com', @ topic = 'test message', @ body = 'This is the body of the test message that receives the database mail successfully recei

visual studio - Javascript prediction -

I'm a big fan of the subtitle text, but I did not see anything that was not useful during the development of JavaScript. Imagine that I have a revealing module pattern var revealingModuleName = (function () {function methodName () {}; function test () {} return { MethodName: methodName};} ()); As you can now know that the function testing is private, and methodName is public Visual Studio, Aptana and PHPStom know this, and when I start typing modulation, After name, dot they only suggest public functions (in this case, method name). Understanding code flow is really useful. Unfortunately, if you do the same thing in the Sublime Text, then this method also recommends the name and the exam, and it is not right because the function does not know anything about a test function. as well. I am not English, I hope that I am justifying it. Is there a plugin to solve this problem? Sublime to create smart as visual studio, PHP Storm or Apatana?

join - How to do a sql conditional joining on multiples tables? -

Image
I already have a SQL request that is collected by joining up to 8 tables, to add an experimental information to me 3 Moray's table will add my information. For this purpose, we can ignore 6 tables (bundled in other_tables ): In the red box, I want to add it to its share. I just want to add request which respects certain conditions, if no one is found, I still want my person, but there is no data in the Request column. So far I tried to do this, but more than one dropped looks ugly and very inclusive. Choose [internal] from request.Id [action] [on other tables] ... join the internal person in action. PixID = Person.Id r.PersonId = Request to join person.Id as R is abandoned. S. SubjectId = r.SubjectId should be included as leaving on tr.IDSujet = s.SubjectId TypeRequest tr Where ([conditions already existing]) and typeRequest = 'MOVE' (?) < P> And once again what should I do: I can get some ), even person if that person If there is a requ

ios - How do I determine which UIView superview is causing the subview to have userInteractionEnabled = NO? -

I have UIView that is showing with userInteractionEnabled = NO and I do not know why the settings in the interface builder enabled user interaction All the ideas have to be seen and there is nothing in the code, the user does not set the interaction for it. If I inspect the values ​​during debugging, however, user interaction is enabled in view and all supervisors == NO. I used the following code in the view controller to loop all the views and inspect their interaction status and even set the clearly enabled value to Yes: BOOL * is enabled = self.someView.userInteractionEnabled; NSArray * _allViews = self.someView.window.subviews; (For _allViews in UIView * currentView) {currentView.userInteractionEnabled = YES; Is controlled = currentView.userInteractionEnabled; } Is enabled = self.someView.userInteractionEnabled; This process is in each stage, the enabled variable is not always even if I set user interaction for use. What am I missing here? Edit: Adding debug code

Jackson2 Java to Json array ignore field names when creating array -

I am trying to create a Java Rest Endpoint which gives a JSON data array to be consumed by the Jacquet float charting plugin is. / P> At least, FLOT requires an array of JSON data numbers, i.e. [[x1, y1], [x2, y2], .. .] Looking at me that Java has a list of point objects list & lt; Point & gt; Data = new arreelist & lt; & Gt; (); where the point is defined public square point {private final integer x; Private final integer wi; Public point (integer x, integer y) {this.x = x; this. Y = y; } ...} What methods or Jackson 2 annotations, if any, I need to get the right object to get the correct JSON format. Currently I am getting the output in this format: [{x: x1, y: y1}, {x: x2, y: y2} ...] < / Ex> When I need this format: [[x1, y1], [x2, y2] ...] You create a custom point serializer import java.io. IOException can write; Import org.codehaus.jackson.JsonGenerator; Import org.codehaus.jackson.JsonProcessingException; Impor

graphics - In Stata, how can I adjust size of coefplot's headings? -

I am working with the coefplot command, which is the Plat Plating Regression Coefficient Is in. Examples of manuals: sysuse auto, keep clear if rep78 & gt; = 3 reload mpg headroom i.rep ## i.foreign coefplot, xline (0) omitted basleval titles (3.rep78 = "{bf: repair record}" 0.foreign = "{bf: car type}" 3 .rep78 # 0.foreign = "{bf: interaction effect}") drop (_cons) This works as expected. I am now trying to tinker with the size of labels of Y axis. I want to shorten them to accommodate a large number of those categories. ylab (labs (vsmol)) But how can I get headings myself? You can add labsize (vsmall) to headings ( ) within a subpoenza. Example: sysuse auto, keep it clear if rep78 & gt; = 3 regpg mpg headroom i.rep ## i.foreign coefplot, xline (0) skiped baselvel /// header (3.rep78 = "{Bf: repair record}" 0.foreign = "{bf: car type} "/// 3.rep78 # 0.foreign =" {bf: interaction effect} &

ms access - Cancel = True not working on form load -

On a form load event, I have this User's Access level check. If it is less than a certain threshold or has never signed in, then I have the line cancel = true However, the form Whether the load Here is the complete form load event. Private Sub Form_Load () IsNull (Forms! FrmUsernamePassword! TxtUserName) Then MsgBox "You must enter a user name or password.", Then vbOKOnly + vbExclamation Cancel = -1 elseif DLookup ( " [AccessLevel_ID] "," tblUsernamePasswords "," [txtUserName] = '' & amp ;! form frmUsernamePassword txtUserName & amp; " '") = 1 then MsgBox "your security level 1", vbOKOnly elseif DLookup ( "[AccessLevel_ID] "," tblUsernamePasswords "," [txtUserName] = '' & amp ;! form frmUsernamePassword txtUserName & amp; " '") = 2 then MsgBox "your security level 2", vbOKOnly elseif DLookup ( "[AccessLevel_ID]", " t

python - How can I initialize wx.Font objects before the wx.App is created? -

In my application there is a module called gui_constants which contains all the fonts and colors definitions of my application For example, there can be a line in gui_constants.py heading_font = wx.Font (12, wx.SWISS, wx.NORMAL, wx.BOLD) , Face = and heading_label = wx.StaticText (self, label = 'Lorem Ipsum') can be called heading_label.SetFont (gui_constants). Heading_font) The problem is that my gui_constants module is being imported before that wx.App is created Has, which is the exception: Traceback (most recent call last): File "./main.py", line 3, & lt; Module & gt; NewGuiApp file from New_gui_app Import "... / application / new_gui_app.py", line 3, & lt; Module & gt; The main menu file from the ideas "... / application / view / __init__.py", in line 1, in & lt; Module & gt; "... / App / View / Banner Use" from the banner import banner file, line 3, & lt; Module & gt; Import

c# - Can't add WCF service reference to client project using netTcpBinding -

I have a WCF service that uses nettip binding and I want to host it in a WPF application. The service starts correctly, but when I try to get metadata using Visual Studio Add 'Service Reference', I get this exception: URI prefix There is no reference to the metadata that can not be solved: 'net.tcp: // localhost: 8000 / mandreck / max' App of my service project .config file: & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; AppSettings & gt; & Lt; Add key = "aspnet: UseTaskFriendlySynchronizationContext" value = "true" /> & Lt; / AppSettings & gt; & Lt; System.web & gt; & Lt; Compilation debug = "true" /> & Lt; /system.web> & Lt; System.serviceModel & gt; & Lt; Services & gt; & Lt; Service name = "Mandrake Services. Ot Evers Service" & gt; & Lt; Endpoint address = "OTSer

c# - How to get binding expression of a datagrid column? -

How can I get the binding expression of a datagrid column in WPF? This is XAML for columns: & lt; DataGridTextColumn x: name = "zodiac column" header = "zodiac" width = "100" binding = "{binding_amount, stringformat = c}" cellstyle = "{statatic resource errorstyle}" /> I use this code to get all the binding expressions in a data grid : Private GetAllBindingsInDatagrid (DataGrid DG) {archive bindings = new archive (); If (dg.ItemsSource! = Null) {foreach (in object items dg.ItemsSource) {DataGridRow row = dg.ItemContainerGenerator.ContainerFromItem (item); If (line! = Null) {foreach (Binding Experiment Binding in the line. Binding Group. Binding Expressions) {Binding.ed (binding); }}}} Return binding; } Edit: Since the question was to obtain a "binding expression" of a column, which refers to an example of a binding, I thought the objective was to check whether someone Verification is errors or somet

algorithm - Fitness function for scm distribution -

Issue: I need a fitness function, which is used to distribute the value and number of objects . denote: I have 1 distribution center (DC) I have 3 stores (S1, S2, S3) The DC of time is for some event. Item A's 30 pcs. The stores ask DC to send them items. Ask for S1 10 PC Item AS2 Ask 15 PCs. S3 asks for 20 pcs. How do I set the optimal number item to send to the store while the DC item & lt; Total items are requested, whereas in each store, the sale of that item is calculated from profit for the fitness function? Example of Solution: Send DC to S7 Send DC 10 to S2 < Li> send DC 13 to S3 What is the best fitness function to use? Use a profit measurement. How will your fitness function look like fitness (integer numberSentToA, integer numberSentToB, integer numberSentToC) {moneyEarned = numberSentToA * priceAtWhichABuys + numberSentToB * priceAtWhichBBuys + numberSentToC * priceAtWhichCBuys; Return money; } However, there is no need to us

How to access built in UI for Mini Profiler and without Cassette throwing InvalidDataException regarding GZip header? -

I'm trying to access the built-in UI for the mini profiler, but it does either do anything or the cassette An Exception in Throwing With cassette URL enabled rewriting, I "/ / mini profiler-resources / result index" to face this error while browsing. [InvalidDataException: The magic number in the GZip header is not correct. Make sure you are going to a jizep stream.] System. Io Compression. Gzipdicoder Reed Header (inputbuffer input) +8662842 system.io. Compression. Inflight. Decode () +560 System.io. Compression. Inflight. Inflet (byte [] bytes, int32 offset, int32 length) 118 System.IO.Compression.DeflateStream.Read (byte [] array, int32 offset, int32 count) 85 System.IO.Compression.GZipStream.Read (byte [ ] Array, Inter 32 Offset, Int 32 Gin) +33 System.io.stream.InteriorCopytoo (Stream Destination, Introducer Buffer Size) +62 cassette.supnet.plasider Replacing ResponseFilter.Site Compressed Optup (Funk`3 Make CompressionStream) +136 Cassette Espanet Placehold

MongoDB YAML "Unrecognized option: security" -

I am running Mongo DB version 2.6 on Windows Server 2012. I'm having trouble setting up a YAML config file for security authorization. When I have the configuration file below, I get an error by simply saying "unrecognized option: security". What is wrong with my config? mongod_test.conf: Security: Authorization: Enabled Authentication Microsystem: Mongodabi-CR Storage: DB Path: F: \ MongoData Command line: mongod.exe --config mongod_test.conf I've added an empty space in my file and it determines the part of the problem I am getting with the current error with the updated config: c: \ MongoDBFolder \ bin> mongod.exe --config mongod_test.conf Unrecognized option: Security. Authentication opportunities for 'Exe --help' for more information Talk to your exact structure You can not get parse errors; Security: Authorization: Enabled Authentication Mikizim: Mongodabi-CR Storage: DBPith: F: \ Mongodeeta

gridview - android Color of the cell on Grid View changes on scrolling -

So I have a grid of text views and it has 228 cells. If a user clicks on the color of the change of cell on any cell on the grid But as soon as I scroll down or take color in another room. I used a customviewview adapter. GetView () is the code. See public getView (see the status of the interview, seeviewParent ViewGroup) {LayoutInflater inflater = (LayoutInflater) reference .getSystemService (context.LAYOUT_INFLATER_SERVICE); View grid view; If (convertView == empty) {convertView = inflater.inflate (R.Lite.fingerprintlayout, empty); } TextView tv = (TextView) ConvertviewFindvibid (Rdteviewview); Tv.setText (gridV [position]); // Setting Text (position == getClickedCellPosition ()) {convertView.setBackgroundColor (Color.BLUE); // background color setting} return convertview; } Is it really a different cell value or a different cell in layout? Convertview == Empty code is to reuse a scene if it is available. So you can set the color for cell 1,1 but when you scroll, that scene

JavaScript runtime error: 'goinstant' is undefined -

I'm new to goinstant. I'm following the example and get the following error on the runtime. Javascript Runtime Error: 'goinstant' is undefined Here is the code: Am I missing something? I should be warned by saying that I got an error before the forum about one. The error is: \ n \ n Javascript key error in line1, column 1 in SCRIPT1014: invalid character The issue is that the CDN is not giving your script correctly. Use this to come back to the local copy from the HTML5 boilerplate: & lt; Script src = "https: //cdn.goinstant .net / v1 / platform.min.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Window.goinstant || Document.write ('& lt; script src = "js / vendor / platform.min.js" & gt; & lt; / script & gt;') & lt; / Script & gt;

jquery - How to handle data binding and dom manipulation for showing/hiding an object in AngularJS -

I have a simple overhead directive that is displayed when a user clicks on a button I would like to do this If the user clicks on the overlay, he hides himself, though, I have an NG-show that forces a variable on the element of the directive, which I do to hide / show the overlay The problem is that if I click on the overlay then Will hide itself, but I can not show the overlay again. Since I am hiding the overlay through a jquery click () handler, the bound variable is not changing wrong. When I try to show it again, the bound variable value is not changing, so it can never be detected again. . What is the best way to handle this situation? Instructions: app.directive ('overlay', function () {return {restrict: "a", transclude: true, template: '& lt; div Class = "overlay"> , link: function (area, element, attribs) {element.click (Function {} {element.hide ();}}}}};}); Used here: & lt; Div overlay ng-show = "showOverlay

scala - json4s: Convert type to JValue -

I want to get some source object src and a JValue def encodeJson (src: AnyRef): string = {import org.json4s.NoTypeHints Import Organ .json4s.JsonDSL.Double._ import org.json4s.jackson.JsonMethods._Import org.json4s.jackson.Serialization Import org.json4s.jackson.Serialization.write Underlying Val Format = Serialization.formats (NoTypeHints) Write ( Src)} This is great if I Only want the last result, but I would like to write: def encodeJson (src: AnyRef): JValue It seems like I use I want to do, but I can not get an implementation for [AnyRef] (nor can I find Scaldeaux for it Json4s which only call me implementation). The answer is org.json4s extraction - this is a method Decomposed (A: Any) (built-in format: form ts): JValue : def encodeJson (src: AnyRef): JValue = {import org.json4s. {Extraction, NoTypeHints} Import org.json4s.JsonDSL.WithDouble._ Import org.json4s.jackson.Serialization Built-in Val Format = Serialization.formats (NoTypeHints) Extractio

javascript - How do i use the code that read the text file that was working with the code that scroll the text in the red box? -

I want tht at the end every time it reads from the text file when two lines display them and red in color Scrolls Box Latest News This is what I tried to do: & lt; Script type = 'text / javascript' src = "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1 /jquery.min.js"></script> & Lt; Script type = 'text / javascript' src = "http://vaakash.github.io/jquery/easy-ticker.js" & gt; & Lt; / Script & gt; & Lt; Style & gt; .demof {border: 1px solid # ccc; Margin: 25px 0; } .demof ul {padding: 0; List style: none; } .demof li {padding: 20px; Border bottom: 1px dashed #ccc; } .demof li.odd {background: #fafafa; } .demof li: after {content: ''; Display area; Clean both; } .demof img {float: left; Width: 100px; Margin: 5px 15px 0 0; }. {Font-family: arial, sans-serif; Font-size: 20px; font-weight: bold; Color: # 06f; } .demof p {margin: 15px 0 0; Font-size: 14px; } .demo3 {font-family: Arial, sans-serif; Bor

Wix registry key changing -

I am using a YX installer file to edit registry entry, but when it is uninstalled So I want to set the value of 0. Here is the code that I am using to set it to 1. & lt; DirectoryRef Id = "TARGETDIR" & gt; & Lt; Component id = "registry entries" guide = "put-GUID-HERE" & gt; & Lt; Registry root = "HKCU" key = "software \ Microsoft \ Windows CurrentVersion \ Policies \ System" action = "create and removeOnUninstall" & gt; & Lt; RegistryValue type = "integer" name = "DisableTaskMgr" value = "1" keypath = "yes" /> & Lt; / RegistryKey & gt; & Lt; / Component & gt; I want it to be uninstalled when it does not remove the key, but it sets it to 0 because I'm sure the task manager What might be the behavior of the key that has been removed? I also agree that action = "make and remove on uninstall" should be something el

java - Recommended settings for a Neo4j Server -

I configure a Neo4j server (2.0.2) itemprop = "text"> In a VMware machine, on a Debian Vertical (7.5) 64 bit server. I use Oracle Java 7 Update 55 64bit. The host system is the server with Intel Xeon X5650 with 2.67GHz. VM will have 2 (virtual) cores with a limit of 1000MHz, 4 GB RAM and 50GB disc space. What is the recommended setting for the Neo4J server if it runs Java like Stacksize, Neo4j size (this runs alone in VM etc.)? I have already increased the number of open files up to 40000. Your graph without detailed information about the structure and size, per timeout according to your current requests, Examine complexity and patterns, versus reading ratios, it is almost impossible to give good advice. You can read through general information. As a rule of thumb, you should have demand for jvm along with the ondisc size object cache of your graph in ram. Common virtual machines have problems related to IO latency. If you can specify the original dis

button - What should the statements be if a character has been entered in a textbox in C#? -

Question 1: As the code states, if the spaces are entered in the text box The button remains disabled, but if a letter or string of characters has been entered, what should be written to enable the button? I think there should be a statement, but I do not know the statement. MD5CryptoServiceProvider md5 = New MD5CryptoServiceProvider (); UTF 8 encoding utf81 = new UTF 8 encoding; TextBox1.Text = BitTorrent.toString (md5.ComputeHash (utf81.GetBytes (textBox30.Text))) SHA1CryptoServiceProvider sha1 = New SHA1CryptoServiceProvider (); UTF 8 encoding utf82 = new UTF 8 encoding; Textbox2.Text = BitConver.ToString (sha1.ComputeHash (utf82.GetBytes (textBox30.Text))) (string.IsNullOrWhiteSpace (textBox30.Text)) {btnHash3.Enabled = false; } And {btnHash3.Enabled = true; } Question 2 On a slightly different note, two files are read from two files and after appearing within two labels, How to enable {System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create

c# - Moving currency from data grid to text boxes to edit then back to data grid? -

I have a program that uses datagrids to display tables from my database, edit a description from the datagrid To do this, I click on the row and populates the data from that row into my text box. I edit it, click the save me button, and update my datagrid. It works perfectly until I try to make a table that is using the currency. I get an uncontrolled datatype mismatch error. Now I am pretty sure that Either because I have a '£' symbol or 'because of' Since the amount is £ 4.99 but I'm stuck on the way to fix it, so I can move it in the text box and edit it correctly. Taking data in the text box works fine but when I edit and save, I get an error. Code for transferring data from text grids to datagrid: // shows information in the Payment Update Area (; 0 || e.ColumnIndex & LT; E.RowIndex & lt 0) {} else {ifments! PaymentsDataGridView.Rows [e.RowIndex] .ells [e.ColumnIndex] .Value = null) {textBox_cus_id_pay. Text = "+" + Payment Data Gri

parse.com - PFUser refreshWithKey? -

Then I have my currentUser in my user class there are some pointers on the first load Are not included. At some point I need them later I understand that I can only get the indicator from currentUser and then query for that object. However, I wanted to include that key in the / user object so that I can use it at this time and later. I do not see any method in parse docs so the only way I can imagine doing this is if I just have a different user query, includeKey , and then the recovered object to current user [/ code>. . Still, I'm doing a lot in this app and I wonder if there is some feature method in the Pars API that I'm missing - something like refresh with Method If there are indicators in your user category, then you can use fetchIfNeeded on them: PFObject * address = [PFUser currentUser] [@ "address"]; [Address fetchIfNeeded]; or with a block: [address fetchIfNeededInBackgroundWithBlock: ^ (PFObject * object, NSError * er

Better and simpler solution for API authentication in Rails -

I am creating an API and I am stuck in the authentication section. I will try to explain what I have and what I am trying to do: First of all, the API is closed to the public, it is only used on the back-end of the admin and Third party equipment in company I have a model called a model that is being used for the certification with the div I am using STI to differentiate between 3 levels of users What did I think: I tried token authentication from the rail, it works but I was scared That every Ajax request, I do not know that I was right. I also tried to use a '/ token' route to post my certificate and obtain a token, but I had to face another problem. I do not want to use OAuth because it is unnecessary for that type of application. Is it safe to use this token authentication with AJAX requests or is there any more safe way to prevent people from accessing my API? Token authentication is required on a secure connection. For example, if you are usin

windows - Batch Script- Passing a delimited string -

I am using a Linux script that takes a delimited string and loops through each value ... MYIFS = ',' IFS = $ MYIFS read -ra contacts & lt; & Lt; & Lt; "$ {CONTACTS [@]}" for "$ 1"; Echo "" ... Try to send to $ i "$ ADB opens - service 0 - n com.android.shellms / .sendSMS -e contact" $ i "-e msg" $ 2 "1" / dev / any person has any idea how can I do anything on the cantonment? I need to use the script from the command line. Stackoverflow.bat "2342342342,23423424234,2123123123" "Message for sending" Maybe it helps you Can: close% s for <% p> % 1% (% ~ 1) Try sending: [% 2] to [%%] Now you have to get the Windows command to do this: starts - User 0 -n com.android.shellms / .sendSMS -e contact "$ i" - e msg "$ 2" 1> / dev / null is now That would be $ i will be %% a and $ 2 will be % 2

css3 - How to write css fallbacks for vh vw -

Can anyone explain how fallbacks work in the CDs? I am trying to establish it for VH and VW and obviously I am not getting it ... My effort here is a solution, which does not work. The height of the property is taken every time. CSS: -WebKit-height: 5.2VH; -Most-height: 5.2 VH; -MMS-height: 5.2 VH; -o-height: 5.2 VH; Height: 41px; / * Fallback * / Your code (and why does not it work) By looking at my original code, I have a few comments: -Winkit-height: 5.2 VH; -Most-height: 5.2 VH; -MMS-height: 5.2 VH; -o-height: 5.2 VH; Height: 41px; The name of the prefix, -webkit - bit, only if has a prefix property on it / * fallback * / . There is no prefixel property in height, so browsers ignored those announcements. (Suggestion: You can examine some of the properties that exist.) Solution: In this case, we gain the benefit Can afford that, if browsers have to face an asset or a price , which they can not understand, they ignore it and then move on, whatever y

entity framework - How do you insert a complex object into the database? -

Assume that these three tables are: - car - id 1 2 - Event- ID Carrier Event Type Date Date 1 1 2014-04-28 12:00:00 - Event Type - ID Name 1 "Entry Created" 2 "Entry Entry in Sales Chart" 3 "Entry Entry Entry Removed " How can the car object be added to the database, by using the Entity Framework (EF5 in my case)? I have tried several different ways to accomplish this, including the code below, but nothing has worked yet car newCar = new car ( } {} Event newEvent = new event () {CarID = newCar.ID, EventTypeID = 2, DateTime added = Datetime.Now; } NewCar.Event.Add (newEvent); Context.Car.Add (newCar); Context.SaveChanges (); Any support will be highly appreciated. Edit: After an exception reference an attempt comes in the catch. Save changelog occurs (). The exception here is: The INSERT statement is contradictory with the foreign key constraint "FK_Event_EventType". There is a conflict in the "cart system" database

sql - “Must declare the table variable” Error with CTE -

When I use a table variable inside a CTE in SQL Server 2005, I am getting the following errors. When I use a physical table, it works fine. The table variable should declare "@Employee". 'wrong syntax') Code: @Emploee table (EmpID INT, EmpName VARCHAR (50), Department VARCHAR (5), Manager INT) @Emploee value (1, 'A', zero, zero) in the @Emploee insert value (2, 'B', 'D100', zero); With EmployeeManagers (select e.EmpId, e.EmpName, e level, e.Manager, e.Empid CurrLevelEmpid, as cast (void as vortar (5)) from department @Employee e.Manager is not e Select zero unions all em.EmpId, em.EmpName, level as level 1, e.Manager, e.Empid CurrLevelEmpID, e.Dept Department EmployeeManagers join them, Employee E on E. Amped = M. Manager) Select Employee Employee How can we fix this error? Context

html - How to make some things not wrap in responsive form? -

Image
I am trying to create a responsive form where there are some things to wrap and not others. I would like it to appear on the desktop When I try to do this, it still wraps the icon: So, how can I have the icon of my own element (period or div), even then did not wrap down the text area? Here's an attempt: And here's a Bootstrap 3 attempt: I would really like to use bootstrap. Here's some HTML: & lt; Div text-element class = "form-group row" & gt; & Lt; Label = "first name" class = "col-md-2 control-label" & gt; First name & lt; / Label & gt; & Lt; Div class = "col-md-5" & gt; & Lt; Input type = "text" class = "form-control" id = "first name" /> & Lt; / Div & gt; & Lt; Div class = "col-md-1 verification mark required" & gt; & Lt; / Div & gt; & Lt; Div class = "col-md-3 verification message" & g

ruby on rails 4 - Omniauth-facebook & Devise: if email exists -

I am using omniauth-facebook and am ready to authenticate in my Rail 4 app. I would like a user who has already been authenticated through the scheme, if they choose, then Facebook can add it later. I would like to know how to check whether the user's email account matches the Facebook user, and if so, add that UID and the provider to the registered user. Currently, I get a divisive error message: " Email has already been taken " User.rb def self.from_omniauth (auth) where (auth.slice (: provider,: uid)). First_or_create do User | User.provider = auth.provider user.uid = auth.uid user.name = auth.info.name user.username = auth.info.username user.email = auth.info.email user.oauth_token = auth.credentials.token If the session ["devise.user_attributes"] is new (session ["devise.user_attributes"], without protection: true) user.oauth_expires_at = time.at (auth.credentials.expires_at) end-end def self.new_with_session (parameter, Session) | Us

Facebook Share Does not Display image -

I got it in JavaScript console The given URL is not allowed App configuration: One or more of the given URLs are not allowed by the app's settings, it must match the website URL or canvas URL, or the domain of the domains app should have a subdomain of one. When I tried to share a link on Facebook here. The problem is, the stock dialogue image does not show. Any suggestions? The error is quite straightforward You have not configured the application settings properly Be sure to add the correct link to site url

angularjs - Angular isolated scope calling parent function -

I am playing with Kangaroo and am trying to know more about scope. var app = angular Module ('myapp', []); App.controller ('MainCtrl', function ($ scope) {$ scope.color = 'green'; $ scope.sayHello = function () {console.log ("Scope from parent");}}); App.directive ('helloWorld', function () {return: Restrict: 'AE', Replace: 'True', Scope: {color: '@colorAttr', sayHello: '& amp;;}, Template: & Lt; p style = "background-color: {{color}}"> Hello world ", link: function (scope, AMM, ethers) {scope.sayHello ();}};}); I'm trying to call parent method (hello), but when I use a different scope it does not allow me I & amp; In separate scope, but I'm not sure I'm using it correctly. HTML & lt ;! DOCTYPE html & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "en" lang = "en" ng-app = "myapp" & gt; &a

php - How to find "This value is also used mostly with that value" with a tags table and an object table? -

मेरी वेबसाइट (www.wyska.net) पर निम्न तालियां हैं: टैग नाम का उपयोग करता है - उस संख्या की संख्या जिसे टेबल पर उल्लिखित किया गया है _tag_wyska _tag_wyska wyska_id टैग_id और फिर एक तालिका wyska वह है तालिका के रूप में _tag_wyska में एकाधिक प्रविष्टियों के साथ एक ही wyska_id हो सकता है, मुझे कैसे पता लगा सकता है कि कोई टैग एक साथ उपयोग किया जाता है अन्य टैग और कौन से टैग के साथ ज्यादातर प्रयोग किया जाता है? और यह कैसे करना सबसे अच्छा तरीका होगा? उदाहरण के लिए wyska_id = abcd1234 में निम्न टैग हैं: < Li> राजनीति रणनीति डेमोक्रेट तब wyska_id = 1234abcd में निम्न टैग हैं रणनीति खेल लीग ऑफ लीजेंड फिर एक और wyska_id = 7890defa है लोग मुझे पता है कि रणनीति 3 बार इस्तेमाल की गई थी, खेल 2 गुना और शेष 1 समय, लेकिन मुझे क्या जानने की जरूरत है कि strategy टैग शब्द खेल के साथ सबसे अधिक इस्तेमाल किया गया था इसलिए मैं game को जोड़ दूंगा और रणनीति उदाहरण के लिए उपयोगकर्ता उप-खोज टैग्स का सुझाव देने के लिए या डेटा का विश्ल

java - Is executing an httpclient that contains both a StringEntity and appended query parameters disallowed? -

I do not know if executing in a httpclient both contains stringent and apeted query parameters or if something is fundamentally this code With the wrong / my perception that what is this doing? This is the same, this is what I think is to do / what I am trying to do: Attach the parameter that is the method for logic within the URL Has been passed. IOW, serNum and siteNum should end in the URL such as: http: //10.0.2.228642.api/DeliveryItems/PostArgsAndXMLFileAsStr?serNum=Bla&siteNum=Bla I have a large AGG which I want to pass within the body of httppost, though - not within the URL. Personal Class Post Delivery item task Extends Async Task {{/ p> @ Override protected string doInBackground (string ... parameter) {string result = ""; String Stratted XML = Param [0]; String Serum = Param [1]; String Sethanum = Param [2]; Uri. Builder Builder = New Uri. Builder (); Builder.scheme ("http"). Authority ("10.0.2.2:28642"). AppendPath

ruby - Getting a While executing gem ... (Gem::RemoteFetcher::FetchError) 503 error when attempting to install rails -

This is an error when I try to do "Mani Rail -4.0.0.0" using Ruby 2.1. 1 and RVM. Error: executing the gem ... (Gem :: RemoteFactory :: FetchError) Bad Reaction Service Unavailable 503 () Not sure What is the reason, does anyone have any ideas? This will be the SSL problem. Change your gem source and try again. Mani source - Delete https://rubygems.org/Gin Source- http://rubygems.org/