Posts

Showing posts from April, 2014

multithreading - are simultaneous reads of a variable thread-safe? -

Assuming that the variable is not at risk at any time to be modified, is there any variation in the variable Is the problem read by 2 or more threads at the same time? If you have a belief, then there is no problem.

Android Remove file with DDMS -

I need to delete a file from an app / data / data folder. I am looking for files in Eclipses in DDS I am If DDMS can not do, how do I delete it otherwise? adb open rm / path / file /

google visualization - Need a design approach or suggestion for a simple structure using Servlet -

I have to design in such a way that whenever a user passes the query, I do this by using the servlet And then call the JS page to draw a chart 1> The user writes a question on a page 2> PublicService class class MyServlet Httpservlet implements the DataSourceServlet {... .. return data users see such a beautiful string .. Google. Visualization.Collices.Setterspension ......... / Tiger'i ,,,, 80.0}, {v: false}}}}}}); 3> This draws the chart when the user hits on different html pages myhtml.js. I want the MyServlet class to call the myhtml.js page and attract the chart directly. And want to end the beautiful string google.visualization.Query.setResponse ......... / Tiger '}, {v: 80.0}, {v: false}}}}}}}; What should I do by coming to the user's browser? I tried to call the request sender (), to call the other page like the function, redirect the myhtml.js page (directly to call the query results after the myservlet process). But I get the results of this googl

c# - NHibernate collections: many-to-many relationships -

I have two models, a product model and a shopping cart model, in the shoppingcart model, as the property named Products There is a collection of products. Here's the mapping for my shoppingcart model. & lt; Class name = "MyProject.ShoppingCart, MyProject" table = "ShoppingCarts" & gt; & Lt; Id name = "id" column = "id" & gt; & Lt; Generator class = "parent" /> & Lt; / Id & gt; & Lt; Many-to-one name = "company" class = "MyProject.Company, MyProject" column = "CompanyId" /> & Lt; Property Name = "ExternalID" column = "GUID" generated = "Insert" /> & lt; Property Name = "Name" column = "Name" /> & Lt; Property Name = "Total" column = "total" /> & Lt; Property Name = "Creation Date" column = "Creation Date" generated = "Insert" /> &

battery - Determine Android phone's proximity to known point while conserving power -

I am trying to determine if the Android user is close to a list of predefined locations. I want to do this with minimal drain on the phone's battery. To accomplish this, I see that there are two mechanisms and what are the pros and cons of the two methods? Will the battery have less effect compared to the other? In either case, I make specific guesses. Location updates are probably less expensive than proximity alerts in terms of battery usage. Since addProximityAlert uses both NETWORK_PROVIDER and GPS_PROVIDER , you lose the ability In addition to choosing which provider to use, in addition to this, while the documentation states that once every four minutes when the screen is closed, it is not a code to support such functionality if it is proximity checked It's getting and I can get what I need One is recommended as it is recommended that background services use values ​​over 60000 MS, I suspect that it would be less expensive requestLocationUpdates direct

java - Getting a JFrame's actual current location -

I'm trying to create a Jeffram (kid) that slides down from one side of Jeffam to another Does. The goal occurs when the child goes around during the child's chase, and the size change responds to events, it is somewhat related to it. I have tried to use a component writer, but with this method, the parents can transfer the child only once after stopping, while I would like the child to be the parent As dragged, dragged around the screen. I tried another option that was to start a new refresher thread, which was continually updated using the getLocation () or getLocationOnScreen () of the child's space, but the interval component listener's Was similar. Is there any way to get a realistic position of a Jafr in the middle of the drag? Or if not, is there any way to slip around the frame to get the effect of a sheet below? > You should use the MouseDrag ged (Mouse Event E) method of the mouse-embedded class as you pull your main window all around, you will ge

flex3 - Flex Open Source Calendar / Enhanced DateChoose -

I currently use the iLog Elixir calendar component, and I am not completely happy. It's a buggy, support is useless and I can not play with the source. Is there a good, streamlined Flex library that knows about the project in which there is a good calendar / date selector component? Thank you, Mr. I found that I used to use the only open source calendar And decided to expand it:

javascript - Collpasible menu needs all header needs to be closed on initial loading -

I have a sidebar with an open menu that works fine but all values ​​come in the expansion of initial loading time Are there. I should close it on the load and then toggled it. Here jquery is used // sidebar toggle var liquid = {toggle: function () {var default_hide = {"grid": true}; $ .each (["Pejanev", "Tipsenave", "Usnesnive", "ImageNew"], Function () {var el = $ ("#" + (This == 'Esenon'? ACCE-Block ': This $ ("[+ Id = 'Toggle -" + +' '] "). AddClass (" hidden ");} $ (" [id =' Toggle - "+ + '']") .bund ("Clicks ", Function (e) {if ($ (this) .hasClass ('hidden')) {$ (this) .removeClass ('hidden'). AddClass ('visible'); El S.Lieddown ();} and {$ (This is) .removeClass ('visible'); ADCLASS ('hidden'); LSLEDEE ();} E. Prentent default ();});});}} JQuery (function ($) {if ($ (" [Id ^ = 'T

javascript - which is the best among jquery,moo tool and yui? -

हाय jquery के बीच, mootool, yui और चमक crossbrowser compatiblity है jquery - सभी तरह से! मैं बाकी के उपकरणों से बचता हूं!

Jquery (this) selector help -

मेरे पास निम्न HTML है: & lt; div class = "box" & gt; & Lt; img src = "pic.jpg" alt = "चित्र" / & gt; & lt; / div & gt; & Lt; div वर्ग = "बॉक्स" & gt; & lt; img src = "pic.jpg" alt = "image" / & gt; & lt; / div & gt; & Lt; div वर्ग = "बॉक्स" & gt; & lt; img src = "pic.jpg" alt = "image" / & gt; & lt; / div & gt; & Lt; div वर्ग = "बॉक्स" & gt; & lt; img src = "pic.jpg" alt = "image" / & gt; & lt; / div & gt; मैं एक ही समय में div और बाल छवि का चयन करने का प्रयास कर रहा हूं। मुझे div ($) का उपयोग करने के लिए div का उपयोग करने की आवश्यकता है मुझे पता है कि मैं $ (यह) का उपयोग कर सकता हूँ। बच्चे () या $ (यह)। चित्र ('आईएमजी') छवि प्राप्त करने के लिए। Div के लिए $ (यह) का उपयोग करके div और छवि दोनों का चयन करने का कोई तरीका क्या है। कैसे के बारे में $ (th

python - Convert sets to frozensets as values of a dictionary -

I have a dictionary that has been created as part of the beginning of my object, I know that the life of this object The key to setting the map will not change during. I want to convert all the values ​​from set to frozenset s, to make sure that they can not be changed. Currently I do this: The key for the self My_dict.iterkeys (): self.my_dict [key] = frozenset (self.my_dict [key]) Is this an easy way to gain? I can not immediately create frozenset , because I do not know how many items will be in each set unless I make the whole dictionary. For example, & gt; & Gt; & Gt; D = {'A': Set ([1, 2]), 'B': set ([3, 4])}> gt; & Gt; & Gt; D {'A': Set ([1, 2]), 'B': set ([3, 4])} You can do this as a conversion Are> & gt; & Gt; & Gt; With the result & gt; & Gt; ; & Gt; D {'a': frozenset ([1, 2]), 'b': frozenset ([3, 4])}

Firefox crashes with mulitple Uploadify JQuery browse buttons and ajax -

I am using a four JQuery Uploadify browse button on a page that says uploadify code / button via Ajax Used to be. We have a javascript function that is full on the refresh that Ajax page refreshes. We are facing our problem that when you start uploading a file, then you browse to upload another file, then Firefox will crash when selecting another file. Any help is appreciated. Thanks! After this I've got some luck: Especially, for any Custom handler, Do not in their name quotes: onComplete: ender // all good 'onComplete': ender // crash-Tastic I do not know why ..

jquery - Weird javascript problem -

I am creating a page that loads intensively with AJAX. This is what '$' is. Get ' jQuery function calls (located on the external HTML page): & lt; Script type = "text / javascript" & gt; $ (Function () {$ ('button') sb_animateButton (); .. $ ('input') sb_animateInput (); $ ('# settings_security_error') to hide (;);}); Function check_password (password, password_upconfig) {$ ('# settings_security_error'). Show (); Warning ('I am in funcion!'); // This works ... if (password.length & lt; 4) // ... this is not {$ ('# settings_security_error'). InnerHTML = 'Password too small'; } Else {password = hex_md5 (password); Password_confirm = hex_md5 (password_confirm); $ Get ('? / Engine / ajax / check_password.php password =' ​​+ password + '$ password_confirm =' + password_confirm, {language: "php", version: 5}, function (result) {$ ('# settings_security_error '

python - can't use appcfg.py update gae -

Recently I want to upload GAAPProxy to GAE But when I use the APCFPPP to update the files, there was an error: urllib2.URLError: urlopen error [Errô 8] _ssl.c: 480: IoO originated in violation of the protocol I do not know why PS: I live in China, and can be due to GFW. And when I use this type: InputenXA and then input the password, I can not radicate on the index page, there is also an error which says: ssl error < According to Div class = "post-text" itemprop = "text"> , this issue is discussed and the solution is to set the proxy, e.g. On the command line in Windows: set HTTP_PROXY = http: //google.cn: 80 HTTPS_PROXY = http: //google.cn: 80 < P> (Or you set proxy for http and https on your platform, which you have not mentioned).

drop down menu - asp.net DropDownList in sync -

I have three dropdowns to select one year under user control I specify the value selected for a drop down on load. The other two drop-downs are automatically assigned to the same selected value. No matter whether the dropdown is allocated to any selected value, all three of them get the same selected value. I've tried to create a new user control for the dropdown, but it does. & lt;% @ Control language = "C #" AutoEventWireup = "true" CodeBehind = "DropDownTest.ascx CS" Inheritance = "Weimann Management. DropdownTest"% & gt; & Lt; P & gt; & Lt; Asp: dropdown list id = "ddlStartDateYear" runat = "server" & gt; & Lt; / ASP: DropDownList & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; Asp: dropdown list id = "ddlEndDateYear" runat = "server" & gt; & Lt; / ASP: DropDownList & gt; & Lt; / P & gt; & Lt; P & gt; & Lt; Asp: dro

c# - Castle Windsor - Resolving a generic implementation to a base type -

I used Windsor as a factory to implement the specification on the basis of sub types of XAbstractBase Trying to use (an abstract message base class in my case). I have the following code: Public abstract class XAbstractBase {} Public class YImplementation: XAbstractBase {} Public class ZImplementation: XAbstractBase {} Public Interface ISpecification & lt; T & gt; Where T: XAbstractBase {bool PredicateLogic (); } Public Square DefaultSpecificationImplementation: ISpecification & lt; XAbstractBase & gt; {Public Child PredicateLogic () {Return Truth; }} Public Sector Exclusive Governance Implementation: ISPCification & lt; YIplementation & gt; {Public bool PredicateLogic () {/ * Actual Work *}} My Component Registration Code looks like this: Container Based on the AllTypes .FromAssembly (Assembly.GetExecutingAssembly ()). ((ISpecification & gt;)) .WithService.FirstInterface ()) I try to solve ISpecification & lt so it works fine; YImple

multithreading - In app purchase on iphone.: How to receive your available products *before* someone may be able to buy it -

Currently I am loading my supported products with a plast and after this I send SKProductsRequest to give this guarantee That my SKProducts are still valid. So I establish the request, start it and get feedback in: (zero) Product Request: (SKP ProductsexQuest *) Requested Response: ( SK Projects Response *) Response Now, so far all tasks are problematic: Calling the request until the response is received, it can last for several seconds. Unless my app is already loaded and user can be able to choose and buy a product. But because no products have been found, the available products are not synchronized with valid products -> is not likely, but possible error. So I think wait till the data is loaded and only continue if the list is valid. (Just wait a few seconds ...). I have a single example of managing all the products. + (MyClass *) Shared Instructions {if (! Shared Instance) Shared Instance = [MyClass new]; // Wait until our data is no longer [Status lock]; Whil

c++ - Modifying documents in memory in yaml-cpp -

I want to read a YML document, filter it by modifying some nodes in memory, and then it's an emitter. The problem is that the YAML :: node is designed to read-only. Is there a way to change the value of a node (in this case with scalar) which I do not remember? What do I do with YAML, I read the file and then under my data structure, YAMAL data Put me It may be that whatever you are searching for, but this is the only way.

sql - Properly populating tables in an Object Relational database -

I got a homework assignment for which to apply the obel relational database to track phone billing data, Oracle 10 It is necessary to use G Express. I have a super class of communication with call, text and sub sections of data, I am making a barrier with populating these constants properly so that I can find suitable data in different tables. My types and tables are declared as follows: Type in the form of the type Type the communication (- column name here) not the last; Type the type of call type communication type (- column name here); Type the type of text under the communication type (- column names are here); Create type datatype under communication type (- column names are here); Create table communication type communication (primary and foreign key barriers here); Type the call of the call; Make a textbook of textbooks; Creating table data of datatype; When I try to put the data in one of the sub-squares, its entry does not appear in Superclass, similarly if I <

Why does this CSS button mess with <a> tags? -

यह मेरा सीएसएस है बटन {सीमा: 0 none; कर्सर: सूचक; पैडिंग: 0 15px 0 0; पाठ संरेखित करें: केंद्र; ऊंचाई: 30px; रेखा-ऊंचाई: 30px; चौड़ाई: ऑटो; } बटन एक {रंग: सफेद; text-decoration: कोई नहीं; } बटन। भरी हुई {पृष्ठभूमि: पारदर्शी यूआरएल (/images/button/btn_right.png) नो-दोहर स्क्रॉल दायें शीर्ष; स्पष्ट: बाएं; फ़ॉन्ट-आकार: 0.8 एएम; } बटन अवधि {प्रदर्शन: ब्लॉक; पैडिंग: 0 0 0 15 पीएक्स; स्थिति: रिश्तेदार; सफेद-अंतरिक्ष: अब्रॉप; ऊंचाई: 30px; रेखा-ऊंचाई: 30px; } बटन। घुमावदार अवधि {पृष्ठभूमि: पारदर्शी यूआरएल (/images/button/btn_left.png) नहीं-दोहराना स्क्रॉल बाएं शीर्ष; रंग: # एफएफएफएफएफएफ; } बटन। घुड़सवार: मंडराना {पृष्ठभूमि-स्थिति: 100% -30px; } बटन। घुड़सवार: हॉवर स्पैन {पृष्ठभूमि-स्थिति: 0% -30px; } बटन :: - मोज़ेक-फ़ोकस- इनर (सीमा: कोई नहीं; } मेरे "बटन" के लिए यहां एक लिंक है। & lt; बटन वर्ग = "गोल" & gt; & lt; span & gt ; & Lt; a href = "profile.php" & gt; प्रोफाइल & lt; / a & gt; & lt; / span & gt; & lt

geolocation - Why does CLLocationManager returns null locations on the iphone SDK 4 beta in the Simulator? -

I have this piece of code: - (zero) location manager: (CLLocationManager *) Manager updated Lotto location: (CLLocation *) Location from new location: (CLLocation *) Old location {NSLOG (@ "Manager updated location!"); Self.currentLocation = newLocationDescription; } I have this code inside a class which is in conformity to CLLocationManagerDelegate I tested first in SDK 3.0 and works well (both simulators and On device) I'm testing this class in the simulator on SDK4, but it returns null as a new location. I can not even get NSLog for the first call. I checked the other app where I use the location framework and it does not work either I have implemented the locationManager: didFailWithError: Not even called. Can anyone confirm that simulator any CLLocationManager capabilities? (A link where a bug has been reported as a known problem, it would be great). Is there a way to fix this? Thanks in advance. - Update: I tested it on the new SDK 4 GM relea

java - Arrays (toString) not output correctly -

Actually this walk continues from the other. There were not enough characters to continue there anyway. The problem is that the output is "1 (10) 2 (23) 3 (29)" although I can return the string for array values ​​(10, 23, 29) and the string reference as 1, 2 and 3 I use. My question is that it is possible to return the index value 1,2,3 as well as return the array values. Am I making a sense of what I have done here ... // int [] group = {10, 23, 29}; Constructor string in tampe = ""; String tempB = ""; Int [] temp = new int [4]; Int length = groups Length; For (int j = 0; j & lt; length; j ++) {temp [j] = group [j]; TempB = tempB + "(" + goups + ")"; } Groups = temporary; Arrays.sort (coingroups); (Int i = 1; i & lt; groups.length; i ++) {tempA = tempA + "+ (i) +" ("+ group [i] +") ";} return temporary; With the code below you are creating a string and this string represents the entire array

Python's cPickle deserialization from PHP? -

/ Em>। इस विशिष्ट मामले में शायद मैं बस वांछित सूचना को पुनः प्राप्त कर सकता , लेकिन क्या इससे बेहतर तरीका है? PHP के लिए कोई भी विस्तार जो मुझे पूरे शब्दकोश को अधिक मूलभूत रूप से परिभाषित करने की इजाजत देता है? जाहिरा तौर पर इसे पायथन में इस तरह से क्रमबद्ध किया जाता है: आयात करें cclickle data as = ऐसे सीरियलाइजेशन की सामग्री यहां आसानी से चिपकाने नहीं जा सकती, क्योंकि इसमें द्विआधारी डेटा शामिल है। समाधान क्योंकि अजगर का अंत है Django, मैं बना रहा। < P> यदि आप अलग-अलग भाषाओं में लिखे गए कार्यक्रमों के बीच डेटा ऑब्जेक्ट्स को साझा करना चाहते हैं, तो इसके बजाय कुछ का उपयोग करके सीरियललाइज़ करना / सबसे प्रमुख प्रोग्रामिंग भाषाओं में एक JSON पुस्तकालय है।

cocoa touch - iPad Camera Connection kit? -

Does anyone know if it is possible to use the iPad's camera connection kit? I would like to read the files from the related physical storage device, would it be possible or is there something that only Apple can do in my app? Thanks I know this is an old question, but Google Brought me here, so I thought I would add to join the next person. The good news is that USB drives are mounted properly and appear in the system as / dev / disk2s1. Wow. You can also add more drives through the hub, supports both iPad FAT and HFS + drives. The bad news is, as the iPhone developer Dustin Howlet found, Mount Point has removed sandboxes with the normal developer use. You can not read or write from that disk using standard iPhone SDK applications.

java - Package not found; javac -

This is upset. I have such a directory structure -lib - some jar files -PackageName - .Java - some other package - some other Java class. Java main.Java import some other popup . And both Java files use jar in Libre. What I do, JR files independently adds to CLASSPATH and then run in this form: javac packageName / main.java but gives the error that the package is not Found SomeOtherPackage . Should it not be a realization of dependence and should also prepare some other package ? What will be the classpath for the Javak command and the above case? Thank you The usual practice is to add package root to the classpath. When you are already in the package root, then -cp. Use . E.g. cd / path / per / all / package javac -cp package name / main.java if you also want to include JAR files , Then ; Use (or * symbol, : ) as a path path separator: javac -cp .; Libre / file.jar packageName / main.java To save time by repeating all the shell command typing,

.net - What might cause this ExecutionEngineException? -

I am trying to use reflection escorted Amit to generate the wrapper class for dynamic assembly automatic wrapper generation A new open source library is part of what I've been calling "GoInterfaces" wrapper class tool IEnumerable & Lt; String & gt; and the wraps from the list & lt; String & gt; . In C # words, it does all: class list 1_7931B0B4_79328AA0: IEnumerable & lt; String & gt; {Private redoni list & lt; String & gt; _obj; Public list 1_7931B0B4_79328AA0 (list & lt; string & gt; obj) {this._obj = obj; } IEnumerator IEnumerable.GetEnumerator () {return._obj.GetEnumerator (); } Public Seal IEnumerator & lt; String & gt; GetEnumerator () {this return._obj.GetEnumerator (); }} However, when I try to call the GetEnumerator () method on my wrapper class, I get the Execution exception exception. So I saved my dynamic assembly in DLL and used ildasm on it. What's wrong with the following code: .class pub

android - Position of builtInZoomControls in WebView and MapView -

I noticed that the position of the inzoom controls created in WebView (bottom, horizontal rights) does not conform to the default state in MapView (below , Horizontal center). 1) Why is it not compatible? (Possibly a question should be asked by Google) 2) Is there a way of horizontal center on the webview's builtin zoom control without implementing custom zoom controls? Or is this the only way? From my experience with Android UI, what I have seen here < Li> When using map activity, there is no reason to actually do the right, you are looking at a map, i.e. A 2D surface that can be scrolled in vol. When browsing a website, most of the content starts on the left and runs right. Therefore, to keep it out in the lower right way while browsing the web in control, when the map (where zoom control is more important), the control should be more important, thus Go to the center, where it is still not here. Before reading your post, I was suggesting using custom

GCC on Cygwin coexisting with MinGW -

Together with the two versions of GCC, is it possible to: Basic Window MinziWe version and Sygwin Linux version? When Sigwin tries to compile the system with the minced version of GCC, and on the contrary, the circumstances are problematic. How can I keep both versions of GCC? Crazy debugging shows that there are one or both of your global paths. Take both of them out of your global path (GCC should perform similar moves directly from "bad command or file name" or CMD.exe) and set shortcuts so they can load the appropriate environment for each.

windows - It's there a way to reload a greasemonkey script? -

Is this a way to reload a script from greasemonkey? For example: When I work on a specific website, Grisamnaki does the script correctly, but when I change the page (Asp, which I think is in the website), the script to be effective Do not reload ... How can I solve it? Wrap your Greasemonkey code in the function and then set a document change event-handler to call it. / * --- AJAX changes on our Greasemonkey code To "reaffirm", we wrap it in a function and call it on a DOM change event. * / Var zGbl_DOM_ChangeTimer = ''; Var bGbl_ChangeEventListenerInstalled = false; / * --- After loading the documents, run everything. Race conditions and excessive "churn" avoids * / Window.addEventListener ("load", main verb, wrong); Function Menation () {if (! BGbl_ChangeEventListenerInstalled) {bGbl_ChangeEventListenerInstalled = true; / * --- Notes: (1) If AJAX loads for a specific node, then add this listener instead of the whole body. (2) iFrame

ASP.NET MVC NullReferenceException when inheriting from a Base Controller -

I've got a base controller that I get from all my controllers. This work is basically to set caching and error handling and to check mobile browsers as well. My UI works fine, but my unit test is failing. import system. Web.Mvc & lt; HandleError () & gt; _ & Lt; CompressFilter () & gt; _ & Lt; Output Cache (Duration: = 30, VaryByParam: = "id") & gt; _ Public Class BaseController: View the inherited System.Web.Mvc.Controller protected override function (ByVal as the VIEWNAME string, ByVal as masterName string, as the ByVal model object) System.Web.View.Movc.ViewResult is slow As the Nullable (Boolean) form = Request.Browser.IsMobileDevice isMobile then returning to MyBase.View (VIEWNAME, "mobile", model) or else Return MyBase.View (VIEWNAME, "Site", Model) from second to second Ending the end of the function then the class Error I will be in my unit exam On the Nullable (Boolean a) = Request.Browser.IsMobileDevice

testing - Using custom Selenium server on capybara -

I am trying to use capebara and selenium, but with a custom server for selenium, for example i The server wants to root cyclab, com, is anyone here tried before doing it? thanks b4 In your env.rb capibara.app_host = "sausselbes.com"

SAP Shortcut file - How to redirect to specific transaction screen in SAP? -

Problem: How to redirect a user to a specific executed transaction screen in SAP? Able to redirect SAP shortcut and user to specific transaction screen. It is possible to pre-fill the necessary input parameters. The same line is in the shortcut - command = ab12RioWo200-input1 = 200001212; Where AB12 is trasaction, and input 1 is the input parameter. This will open the SAP screen, AB will be filled with 12 transactions and input parameter values. But after opening a shortcut file the user explicitly commands to click / click to click clearly. Is it possible to include the shortcut file? Thanks :) Got it! Just before the transaction * add / specify the workflow - thus leaving the initial screen will be left if all the required input parameters are filled.

stored procedures - SQL 2008 Change Data Capture Query Performance Issue (SP vs. straight query) -

Before opening a ticket with Microsoft support, I thought I would try the community! I is an application for development, for which we are using data capture changes in SQL 2008 R2 (developer version, currently). For some special complex questions, we want to wrap the question in the stored procedures, to expose the common parameter, to avoid complexity in the client (general argument) ... In any case, What we have identified is that the following statement, as a standalone query, will run in approximately 3-5 seconds regardless of the boundary conditions, while the same statement, as a stored procedure To produce Inam jumps to 1.5 minutes. In addition, the running SP version switches the user identity several times during execution ... Besides, during the execution of SP, CPU Usage Spike Any thoughts? Question: Binary @fromlsn declaration (10), binary (10), @NodeID varchar (6) set @NodeID = '123456' @tolsn, @ fromlsn = 0x000017E60000010001, @tolsn = sys.fn_cdc_g

Delphi Binary/Text File Necessity -

I'm an engineer and not a software programmer, so please seduce my ignorance. I have written I have completed this very program. What I have not completed I For a digital portfolio, as explained by the following yet: I call this "real" A text file would be fine even if I want to save the data to a binary file, but I am concerned about having a large data file. I also want to read this data from a binary / text file so that the data can be displayed using my Delphi application. I do not think it will be very difficult. I currently save my data in CSV format. Here is the twist that the binary file should contain data from different sessions initiated by the user of my application. So when I click, I say, a button called "historical" data, a new window / form will pop up, which will show different session times that I started & amp; After the first time closed, a session will be selected and the data retrieved to display. Can it be done

osx - missing entry in launchctl after restart -

I have a daemon running with launctl as a system-wide-daemon Automatically load with each system startup or if Damon crashes. I have registered this daemon with: sudo launchct -l / library / LaunchDaemons / plist.file < P> Everything works fine My daemon is registered and sudo projection list with launchctl > But after the user restarts on some Mac, my daemon is not running If you have -w / Code> needs to be used, then the disabled key Ayd set.

javascript - Alternative for .click() method in Firefox -

I have href , from which I am giving a popup, and I activate it I want to use document.getElementbyId ("myelement") in my body's onload . Click () which works fine in IE but Firefox does not support it. I know that . Click () will not be supported by Firefox, but I have no other way of doing this. Can you please suggest an alternative solution that works in IE as well as in FF? Thanks in advance. You can do this as a suggestion of alceendi, or if you need an event object then you can You can use dispatchEvent to trigger an event handler: Document.body.onload = function {var element = document.getElementById (" Element"); If (element "click") element.click (); Otherwise if (element "Send Event") {var evt = document.createEvent ("MouseEvents"); Evt.initMouseEvent ("click", true, true, window, 0, 0, 0, 0, false, false, false, false, 0, zero); Element.dispatchEvent (evt); }} It is sometimes useful to

mysql php problem: no error message despite error_reporting(E_ALL) line -

index.php & lt; html & gt; & Lt; शीर्ष & gt; & Lt; title & gt; जोश के ऑनलाइन खेल का मैदान & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; form method = "POST" action = "action.php" & gt; & LT; तालिका & gt; & LT; टीआर & gt; & Lt; td & gt; "सामग्री के लिए डेटा" & lt; / td & gt; & Lt; td & gt; & lt; इनपुट प्रकार = "टेक्स्ट"? & Gt; & lt; / td & gt; & Lt; / टीआर & gt; & LT; टीआर & gt; & Lt; td & gt; & lt; इनपुट प्रकार = "सबमिट करें" & gt; & lt; / td & gt; & Lt; / टीआर & gt; & Lt; / तालिका & gt; & Lt; / प्रपत्र & gt; & Lt; / body & gt; & Lt; / html & gt; action.php & lt;? Php error_reporting (E_ALL); Ini_sit ("display_errors", 1); $ Mysqli = नया mysqli ('स्थानीयहोस्ट', 'रूट', 'पासवर्ड', 

zend framework - set/add view from controller action -

I am currently trying to set a visual script to execute except the requested action view script. I want to do this with controller action that this new visual script output will be available from $ $ layout -> layout () -> content assistant I got the setview () > Just want to present some other visual scripts from an administrator: $ this-> Render ('see something'); Anything that will provide someviewview.phtml: expanding myController class Zend_Controller_Action {public function fooAction () {// renders my / foo.phtml $ This- & gt; Render (); // Render meer / bar.file $ this-> Render ('bar'); // render baz.phtml $ this-> Render ('falcon', blank, true); // renders the 'form' segment of the '$' of my / login.phtml / response object-- ('login', 'form'); // render site.phtml for feedback 'page' segment / object; 'My /' subdirectory $ this- & gt; Does not use render ('s

python - how do i take advantage of sqlite manifest typing / type affinity using sqlalchemy? -

I like the idea of ​​sqlite typing / type affinity: Basically, if I set the affinity of a column as 'numerical', then it floats to store it as an integer or type, but still allows me to store the stars if I I think I think this is the best 'default' type for a column, when I get that data Unbelievable first time what I want to store it. I go to: metadata = metadata () new_table = table (table_name, metadata) = but when I try some string values ​​and store them I like "ABC" in the table, sqlalchemy drops: file "[...] \ sqlalchemy \ processors.py", line 79, to_float wa C float ValueError: invalid for float verbatim: abc Boo, her. So, is there any way that I can explain Skylightmi to typing squilit? Probably Can I use sqlachemy.dialects.sqlite instead of sqlalchemy.types? for bonus points [edit: I should be able to use the table through introspection / reflection So then some kind of work with meta.reflect () Security would be gr

WPF Button Animation -

I have a control template for such buttons that looks like this: & Amp; Control; X: Key = "CopyButton" TargetType = "{x: type button}" & gt; & Lt; TextBlock horizontal alignment = "center" vertical alignment = "center" text = "> gt;>> gt; & gt; & Gt; & Lt; / ControlTemplate & gt; How can I go about animating it so that when the mouse is hovering over the mouse button, "move" I mean the text "gt;", "gt ;> ">">>>>>>>>>>>>>>>>>>>>>>>> , "& Gt; & gt;", "& gt;" in a repeat You can use a string animation. The result is that I do not see the most professional in my opinion. & lt; Button name = "myAnimatedButton" width = "200" content = "& gt;" & Gt; & Lt; Button.Triggers & gt; & Lt; EventTrigger R

cycle - the query is breaking. How to skip rows PHP -

I probably have a lame question but I got stuck that I have a DB query < From the "select" products from where razdel = 'mix' and id = '$ id + 1' and litraj = '$ litri' order IDsc "; $ Reconcert 10 = mysql_query ($ query_recordet10, $ Victor) or die (mysql_error ()); $ Row_reecordset10 = mysql_fetch_array ($ Recordset 10); $ total Rows_Recordset10 = mysql_num_rows ($ Records 10); The current product ID On the basis of the next answer in the line But if the next product matches the criteria, 2 or more IDs in the query break my cycle further. Thank you very much. Change your query to: $ query_recordet10 = "SELECT * from products razdel = 'Mix' and 'id' '$ id' and litraj = '$ literary' order by ID ash border 1 "; So you still have 1 row returned (if any Something is back), but You can line up (next to the ID as per ASC according to the ID) (possibly) with an incremental ID line

c# - Using a .NET MVC Controller Action as the Source for an HTML <img> -

Image
I am trying to display an image associated with a user in my database (image field's data type Image is HTML Administrator action public byte [] image (id) {UserRepository r = New UserRepository () ; Return R. Single (ID) .logo.ToArray ();} < Strong> Problem solved < P> Sorry, I did not read enough on this! All that was needed to do is make the Controller Action Return FileContentResult Public FileContentResult Image (User ID) {UserRepository r = New UserRepository (); New File Content Result (R. Single). Return ToArray (), "Image / JPEG");}

c# - How do I properly Load a Workflow after Pausing/Persisting it? -

Using it as an example to interrupt and resume, one would assume that it is very straight forward Will happen. It is such that I am "pausing" the workflow ... LastWfGuid = workflow.Id; Workflow.Unload (); It is very easy, it has continued for example store (which I have already set before these two lines) and I look at the entries in the instances view and instantable. When I'm ready to start workflow again, I do this ... workflow = new workflow application (my activation, myWfArgs); Workflow.InstanceStore = wfStore; Workflow.Load (LastWfGuid); At that point I get a invalid operation exception with an exception message ... Workflow input with loads Can not be used or loadRunnableInstance, because they are provided only for new instances. If I can not load a workflow that was already being created, how do I start it again? I tried to keep only continuous () in the place of unload () and it looked fine from the outside and I got no exceptions. Howev

Why does reusing arrays increase performance so significantly in c#? -

In my code, I work in a large number, to store data on a temporary basis, Array is required. I have around 500 tasks at the beginning of every work, I allocate memory for an array: double [] tempDoubleArray = new double [M]; M is a large number based on precise work, usually around 2000000. Now, I do some complex calculations to fill the array, and in the end I use the array to determine the result after that, after this work, tempDoubleArray goes out of the scope. Profiling indicates that the call to create arrays is time consuming, so, I decide to try and reuse the array, by making it stable and using it again. To find the minimum size of this array, a few additional jogging is required, in which all tasks require extra pass, but it works. Now, the program is very fast (for the execution of all tasks from 80 seconds to 22 seconds). double [] tempDoubleArray = staticDoubleArray; However, why do I have a little bit in the dark why it works right. The ID says that in t

iphone - When editing, `UITableView` does not call didSelectRowAtIndexPath ?? -

I have a UITableViewController where the user should be able to edit the item I use it to enable editing: self.navigationItem.rightBarButtonItem = self.editButtonItem; For all of those, where we do not know where self.editButtonItem comes from, it is predefined by SDK. Therefore, now when I press on any item, this method is called: - (zero) tableview: (UITableView *) table view SelectionRowAtIndexPath: (NSIndexPath *) indexPath But as soon as I have the editing button and editing active, this method is not being called. What am I missing? This is the rest code that is related to editing: // Override to support conditional editing of the table view. Table view: (UITableView *) Table view can edit the audit path: (NSINxpath *) IndexPath {// Return N If you do not want the specified item to be editable, Yes come back } - (UITableViewCellEditingStyle) Table view: (UITableView *) table view editing style PhorRowAtIndexPath: (NSIndexPath *) indexPath {return UITabl

python - Eventlet or gevent or Stackless + Twisted, Pylons, Django and SQL Alchemy -

We are extensively using twisted applications for applications requiring asynchronous IOs. There are some cases where the goods are connected to the CPU and for this we create a pool of processes to work and many servers have a system to manage them - all have been done very well. Works. The problem is that it is difficult to bring the members of the new team up to speed. Writing in asynchronous code requires a near-vertical learning curve. It seems that humans simply do not think that way naturally. We are probably considering a mixed approach that may be part of the xmlrpc server and twisted process management and other code in the code that looks synchronous until at least some time. That's not the case. Again again I have more obvious lies because I would think a little bit more about this on the greenlets anyway - how well does that stuff work? So there's Stackless and as you can see from my avatars avatar I have considerable success information in the first hand of

ruby - Setting an instance variable from a block -

How do I get something like the following so that when I set the s variable in the block, it Set the @subject example variable in my subject class? Category topic def theme (& amp; blk) blk.call (@subject) if block_life is done? @ Block_given until search? End end my_topic = subject.nip my_topic.subject # = & gt; Zero my_topic.subject do S | S = ['one', 'two', 'three'] s.pop p s # = & gt; ['One', 'two'] end p my_topic.subject # = & gt; The way you want to be [a, 'two'] You can not do that, block logic refers to the same object as the example instance, but they are completely different variables and one set will never be set to two, there are two options: < Ol> Set the variable in the result of the block, then it will be: class subject def subject = subject = if block_give is received? @ Block_given until search? End of End and inside the block: my_topic.subject do s = ['one', '

php - Is there an open source cross-platform push server? -

I currently need a free (preferably open-source) push server, which supports both Linux and Windows. I need something similar, but this project unfortunately does not work on windows (I can use a virtual machine, but it is not what I see). I should be able to push information from the PAP script, from / from a pygmy daemon for javascript and / or blackberry application (created with java). Is there any device that can help? I have also seen in class, but clearly there is a lack of a lot of documents in it and it is very difficult to understand. I'm not sure that this can work for me because it's not really a push server, but it's a proxy created in the Morbiduke server (or am I wrong?). What kind of technology is the job of the Queuing Protocol Message for a project like this? Something like RabbitMQ or ActiveMac? Thank you very much for the help. I love active active, especially with camels. Push for Web Technology, comes first in mind.

uiview - How to control overlapping Alpha fades on iPhone -

I have two animation methods, basically simply repetition ... how do I prevent them from overlapping and flickering, doing this Convenient way to do? Thanks, - (zero) doPowerChangeAnimUp {powerIconChange .alpha = 0; [UIView startup permissions: zero reference: NULL]; [UIView Set AnimationDesettop Selector: @Selector (AnimationDidtop :)]; [UIView Set Delegate Animation: self]; [UIView Set Animation Duration: 2]; [Power icon set alpha: 1]; [UIView commitAnimations]; } - (Zero) Animation DIDStop: (nssting *) AnimationEnd {[UIUUU Startup Permissions: Zero Reference: Null]; [UIView Set Delegate Animation: self]; [UIView Set AnimationDesetSet selector: @Selector (doPowerChangeAnimUp)]; [UIView Set Animation Duration: 2]; [Power icon set alpha: 0]; [UIView commitAnimations]; } You try to set an autorver instead of making the animation a new animation Can generate a smooth "bounce": - (zero) doPowerChangeAnimUp {powerIconChange .alpha = 0; [UIView startup permission

cocoa - Cannot bind NSSlider in IB? -

I have just created a new Xcode project in the AppControl class header file I have defined the following objects (and some others are also) : IBOutlet NSImageView * inputImageView; IBOutlet NSImageView * outputImageView; IBOutlet NSTextField * myNoiseLevel; IBotlate CGFBlot * MySprincess; By entering the original code in .h and .m files, I then went into the interface builder and created my UI. I was able to force two NSImageView controls in the IB with the respective NSImageView object listed above. And I was able to bind some other items / controls too, too. But I'm unable to tie the previous two items (my noselevels and myspersis) on the main window in the nsl-slider controls. I am not sure why I know that this kind of thing is difficult to diagnose, because it is not "strictly related code", but if there is something "difficult" about the compulsive sliders please tell me that the main " What are "suspicious" ones that I should check

ruby - How do I include Responder in ActionController::Metal in Rails 3? -

I am working with a Rail 3 controller which has a very specific, limited purpose, and I need to answer it To answer is: json. This screencast says that my controller can inherit from ActionController :: Metal, and after that I need to speed up some things: When my controller looks like this Is: class folder controller & lt; ActionController :: Metal respond_to: json def All response_with folder.all end end I get an error: Unfinished method 'feedback_to' for folder controller : Class I have tried the Respondor, Action Controller :: Respondent, including the Action Controller :: Metal :: Respondent, but none of these works to achieve this liability functionality. What am I involved in? You need to include more classes, not only the respondent here is my application controller but all of them Can not be required: class Api :: ApplicationController & lt; ActionController :: Action Controller :: Helpers in Metals include ActionController :: UrlFor

cocoa touch - How do I change the background image of my iPhone app? -

I've looked around and I've got some code that chooses an image from an array of image objects , But an explanation can not be found. I would like to make my app a background image and the user can select the next and previous buttons to scroll through some full screen images, such as the background image of them when scrolling Is set in. I know how to do this in Java, but this app can not do this app. How to capture the next image in the array or by which code is added back to the next code? Then it needs to be clearly displayed. I have used a layered architecture with an MVC style approach, but it has to be kept with no objective purpose. Do the buttons call the appropriate methods of the so-called delegates, who attract the representatives and bring the images back? Will the buttons use the returned pictures and really want to handle the reconstruction? I appreciate the help. Regards Forward Raise the answer by syoleen. NSArray * names = [NSAr

jquery tablesorter sorting numbers incorrectly -

In my table there is a column of numbers that is incorrectly sorted. Example numbers: 5.8 2.4 10.7 0.1 1.9 And basically my problem should be 10.7 very early / very beginning, on which it was sorted Was there. But it is visible in the middle. Try manually specifying the column parser You can easily do this through metadata For the columns in question, the parser type in the class of the table headers indicates. For example: & lt; Th class = "{sorter: 'floating'}" & gt; Further reading: (Tabslitter's own documents are weak on this. Of course you can also view the source .)

android - Java Thread Message Passing -

I'm writing an Android app. I have a main method, which creates and runs a new thread using an anonymous Inner Runnabal class. Run () method, when this is done, then calls a method in its original class (in the main thread) that indicates the call Dataset Cheng () so that the main thread can reproduce new data. This is causing all kinds of problems (ViewRoot $ CalledFromWrongThreadException). The thing is, this method, called a uniform thread, is a class created in that UI thread. Should not it run on the UI thread? Or am I missing something? There is some code about what I'm talking about: Public class enhances malmer activity {@ Override Public Wide On Crate (Bundle IKEIL) } {(New thread) {Public Zero Run} {// A group of slow network content Update ();}}) Start (); } Private Zero update () {myAdapter.notifyDatasetChanged (); }} Did you try to call the UI updating code? Something like this: Private Zero Update () {runOnUiThread {New Runnabal} {Public Zero R

php - How can I split a list with multiple delimiters? -

Actually, I want to enter text in the text area, and then use them for example < Pre> variable1: variable2 variable3 variable1: variable2 variable3 variable1: variable2 @ variable3 I know that I use each row an array, and then use each line separately To use a foreach loop, but how do I use to separate the three variables? try preg_split

asp classic - VBScript get MIcroseconds -

Does anybody know that SQL queries in VBSSP (Classic ASP) How to get the value of microseconds without using I still unable to get the microscope I am, but I am a JSCRIPT & lt; Script language = jscript runat = server & gt; Function milliseconds () {var d = new date (); Return d.getTime (); } & Lt; / Script & gt; Then call the function to get the accuracy of milliseconds :) Hope

iphone - changing text color of uitabbaritem -

Anyone can help me in this weird problem, anyway, changing the text color of the YouTube bar object defaults to white and selected Blue by color The old question is, but I have a new answer that is supported in iOS 5 (I also have LLVM 4.0 liters) [[UITabBarItem presence] setTitleTextAttributes: @ {NSForegroundColorAttributeName: [UIColor whiteColor]} forState: UIControlStateNormal]; [[UITabBarItem appearance] setTitleTextAttributes: @ {NSForegroundColorAttributeName: [UIColor blue color]} forState: UIControlStateSelected];

How to get NUnit information into CruiseControl.Net 1.5 after NCover has run NUnit? -

I have installed NCOVER 3.4 on my Cruise Control 1.5 and after some tinking, my cover report is in my cleanliness Looks installed cc. Although I can not see the results of the test (and never after installing CC Net 1.5, as I remember 1.4 it 'just work'). How can I get the results of unit test from the NCOV display in the CCIN? Anders, Denmark "> Sorry - I got to know myself. I was including an incorrect file under the Publisher / Merge / File. Once correct, it works as desired.

wpf - Problem with validation and multibinding -

मेरे WPF अनुप्रयोग में मैं निम्नलिखित xaml का उपयोग करता हूं: ... & lt; TextBox सेवाओं: टेक्स्टबॉक्स सेवा। आईएसएफकॉक्स्ड = "{बाध्यकारी पथ = ईस चयनित, मोड = वनवेज़}" फोकसविजुअल शैली = "{x: नल}" & gt; & Lt; मल्टिबाइंड कनवर्टर = "{स्टेटिक रिसोर्स mconv_operableToString}" अपडेटसॉर्सट्रिगर = "प्रॉपर्टी चेंजेड" & gt; & Lt; बाध्यकारी पथ = "मान" मोड = "दोवे" अधिसूचनाओनवाहीकरणएयर = "सत्य" / & gt; & Lt; बाध्यकारी रिलेटिव सोर्स = "{रिलेटिव सोरस FindAncestor, पूर्वज प्रकार = {x: टाइप यूज़र कंट्रोल}}" पथ = "डेटाकॉन्टेक्स्ट। स्टेटस" मोड = "वनवे" / & gt; & Lt; / MultiBinding & gt; दृश्य मॉडल वर्ग जो पहले बाध्यकारी सत्यापन का उपयोग करता है IDataErrorInfo सत्यापन उद्देश्यों के लिए समस्या यह है कि हालांकि संपत्ति को संपत्ति के सेटर में पकड़ा गया है, लेकिन UI इसे ध्यान नहीं देता है। मेरे पास एक त्रुटि टेम्प्लेट के साथ परिभाषित शैली है जिसे पाठ बॉक्स में क

Equivalent in vb.net's MaskedTextBox to cliptext property in vb6's Masked Edit control -

I find this property useful but in vb.net no direct replacement can be found for it. is anybody here? Thanks Simply call masked text box 1. Enter text mask format = mask format. Insert and transliterate text from property.

python - Validation on ManyToManyField before Save in Models.py -

मेरे पास निम्न मॉडल हैं: class अनुप्रयोग (models.Model): users = Models.ManyToManyField (उपयोगकर्ता, = 'अनुमति' के माध्यम से) फ़ोल्डर = मॉडल। फ़्रीइन्ग्ज (फ़ोल्डर) वर्ग फ़ोल्डर (मॉडल.मॉडेल): कंपनी = मॉडल। बहु-मानकीफिल्ड (कम्पनी) वर्ग UserProfile (models.Model): user = models.OneToOneField उपयोगकर्ता, संबंधित_नाम = 'प्रोफाइल') कंपनी = मॉडल। बहु-मानकीफिल्ड (कंपनी) मैं क्या करना चाहूंगा यह देखने के लिए कि आवेदन के उपयोगकर्ताओं में से कोई एक ही कंपनी है एप्लिकेशन (फ़ोल्डर के माध्यम से) यदि यह मामला है तो आवेदन उदाहरण को सहेजा नहीं जाना चाहिए। समस्या यह है कि कई टाईमैनीफिल्ड 'पोस्ट-सेव' सिग्नल के बाद तक अपडेट नहीं किए जाते हैं। एकमात्र विकल्प नया m2m_changed संकेत हो रहा है लेकिन मुझे यकीन नहीं है कि मैं पहले से ही बचाए गए सहेजे को वापस कैसे रोल करूंगा। एक अन्य विकल्प सहेजने के फ़ंक्शन को फिर से लिखना होगा (models.py में, क्योंकि मैं यहां व्यवस्थापक के बारे में बात कर रहा हूं), लेकिन मैं 'मुझे यकीन नहीं है कि मैं कितने टेटमैनीफील्ड सामग्री का उपयोग

Is there any 'alias' feature in SVN like we have in CVS? -

I am migrating SVNs from CVS. In CVS I have various aliases defined in the CVSrot / module file. It helps checkout several directories at one time. For example: File the nickname defined in the CVSROOT / Module file = ----- ---------- ---------------------------------------- ---------- --------------------------------------- ----------- ----------- = So my checkout is optimized with comamnd $ cvs co / dir1 / I know whether there is any common feature in SVN . Maybe you

c - How to treat 64-bit words on a CUDA device? -

I want to handle 64-bit words directly on the CUDA platform (like uint64_t vars). I understand that all addressing space, registers and SP architecture are all 32-bit based. I actually got it to work correctly (on my CUDA CC.1.1 card): __ global__ blank test64Kernel (uint64_t * words) {( * Word) & lt; & Lt; = 56; } But I do not know, for example, how it affects the use of registers and the operation per clock cycle count. What type of data types can you use 32-bit addresses or any other type of data In your example, you have a pointer (32-bit, 64-bit, 3-bit (!) - does not matter) for a 64-bit signed integer. 64-bit integers are supported CUDA but for every 64-bit value, you are submitting as much data twice as 32-bit values ​​and will use more registers than this and arithmetic Operations will take longer (two 64-bit integers will be expanded to only small) Datatype is used to push in the next sub-word). Compiler is an optimization compiler, so try to minim