Posts

Showing posts from May, 2010

mysql - Confusing output from time -

This command receives some data from MySQL and then changes it. The 'real time' time from the 'user' time is so high Why is that? & gt; Time ./command.rb Real 45m45.457s user 3m36.478s sys 0m28.226s For clarification - I understand the difference between real, user and system output. However, I am confused about why such a big difference is on the machine I am running on it, actually using the CPU is nothing else, and I do not have any threading in my order. All this data Does a complex MySQL statement take such a difference? The user and the system report the time the CPU is busy. Try anything when the network will not be busy when blocking like network or disk I / O, for example, "Time sleep 1", or "Time DD if = / dev / zero of = / dev / null BS = 1024 count = 1000000 "to see the difference The first will be just blocks, the second will include a lot of CPU usage.

iphone - UIGetScreenImage - Private API -

I was using UIGetScreenImage in my app, however, everyone knows that the apps using the Apple Private API Dismissing. I have researched alternative ways of doing this with lip, but you get different size images as well as troubled snapshot sounds. Microsoft Tag Quickmark and Radlaser all use UIGetScreenImage (this is obvious) but I want to do it legally. Anyone there have been any suggestions so much appreciated. This can work ... I think this was the answer to another SO question. - (UIImage *) Capture View: (UIView *) See {CGRK screenprint = [[USScreen main screen] border]; UIGraphicsBeginImageContext (screenRect.size); CGContextRef ctx = UIGraphicsGetCurrentContext (); [[UIColor blackColor] set]; CGContextFillRect (CTX, ScreenTrack); [View.layer renderInContext: ctx]; UIImage * newImage = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext (); New image refund; }

c# - How to Programmatically change a Tab Control's Index & State (Perhaps using commands?) -

मेरे पास एक WPF TabControl है जिसमें कई TabItem s बच्चे के साथ UserControl रों, इस तरह XAML:। & lt; TabControl एक्स: नाम = "tabsMain" HorizontalAlignment = "मांसपेशियों" VerticalAlignment = "स्ट्रेच" ग्रिड। रोल = "0" ग्रिड। राउस्पेन = "3" पृष्ठभूमि = "हल्का" & gt; & Lt; TabItem Width = "100" हैडर = "प्रोफ़ाइल" FontSize = "16" & gt; & Lt; InfoControl: InfoTab x: नाम = "myInfo" / & gt; & Lt; / TabItem & gt; & Lt; TabItem Width = "120" x: नाम = "सारांश" हैडर = "सारांश" FontSize = "16" & gt; & LT; SummaryControl: SummaryTab / & gt; & Lt; / TabItem & gt; & Lt; / TabControl & gt; एक UserControl s में से, कह सकते हैं, InfoTab , मेरे पास एक बटन है । जब यह बटन क्लिक किया जाता है तो मैं TabControl को SummaryTab के सूचकांक में बदलना चाहूंगा और SummaryTab पर एक रेडियो

python - Adding an argument to a decorator -

I have this decorator, when I use to decorate the digenone scene, share is the argument < Code> True (Controlled by middleware) class no_share (object): def __init __ (see itself): self.view = view def __Call __ (self, request, * Args, ** kwargs): "if" kwargs.get ('shared' is true): "do not vote if you share" Django.http to import HTTP 404 HTTP 404 'to share' Not available ') returns self.view (un Corrupted, * Args, ** kwargs) It currently works like this: @no_share def prefs (request, [.. .]) But I want to extend a little functionality so that it works like this: @no_share ('prefs') def prefs (Request, [...]) My question is how can I modify this decorator class so that it can accept additional logic? I hope articles by Bruce Eckell It helps. Update: Your code for the article will look like this: class no_share (object): def __init __ (self, arg1): self .arg1 = arg1 def __call __ (self, f): "

php - How to automatically retrieve current adword spend from google -

Do anyone know the guide or tutorial to access Google AdWords reports? I am trying to pull the advertising expenditure per day in my application (checking or the current time of last Google update). I can not get the API documents or methods to spend Anyone know of any good tutorials? Or can you tell me in the right direction? Ideally god should be in php :) UPDATE Using APIs is at a cost ... I ideally like it Looking for a way to pay! So if any "backend" method is the way to do it for free, scraping the front end is a possibility that I think ... UPDATE 2 < / P> Ignore the above, the cost is so low, the API call is sufficient. But I still could not find the API method to get current or past expenses .... Have you seen I think the question you want (cost data is included)

c# - Can't get Value from ComboBox -

Image
I have a simple combo box with some value / text item in it. I am using a combo box. Displaymilm and combo box. Valuemail, set true / value when I try to get value, it returns an empty string. Here is my code: Formload Event: cbPlayer1.ValueMember = "value"; CbPlayer1.DisplayMember = "Text"; Select the combo box eventindex: cbPlayer1.Items.Add (new {value = "3", text = "should have value of 3"}); MessageBox.Show (cbPlayer1.SelectedValue + ""); and it returns a blank dialog box. I had also selected the combo box. The selected item.Value (see VS, see picture) but it does not compile: 'Object' has no definition for 'value' and no extension method 'value The first argument of type 'object' can be accepted (do not you remember the use director or assembly reference?) What am I doing? Not sure what the combo box. The selected value means it has a selected item property, it is not set wh

c# - InvalidOperationException - object is currently in use elsewhere -

I have gone but did not help with this. The case is different here. I'm using backgroundworkers The first page user starts working on the user's image input and I'm calling 3 other backgroundwalkers in the first BackwardWorkWorkerReinerary () algo1backgroundworker.RunWorkerAsync ( ); Algo2backgroundworker.RunWorkerAsync (); Algo3backgroundworker.RunWorkerAsync (); This is the code for each: algo1backgroundworker_DoWork () {Image img = this.picturebox.Image; Imgclone = img.clone (); // work on imgclone and output it) algo2backgroundworker_DoWork () {image img = this.picturebox.Image; Imgclone = img.clone (); / / Work on Imgclone and output it} Similar works are done in other algorithms * Backgragrunderworker_workwork. Now I am getting some time "InvalidOperationException - object is nowhere in use" Its very arbitrary I have some time in it algo1backgroundworker_DoWork and sometimes in algo2backgroundworker_DoWork and sometimes in the application

flex - Does FlexBuilder 3 work with Eclipse 3.5.1? -

I'm trying to install Flex Builder 3 as a plugin on Mac 10.6.2 in Eclipse 3.5.1 I am During the installation phase, FB3 says that it only eclipses 3.3 & amp; 3.4. But I started installing anyway. After the installation, I could not find Flex perspective from Eclipse. So I found the possible way to manually add this link file from the folder "link" to point to Google and FB3 plugin folder. I did this and the FB perspective can now be shown, but when I try to switch to an FB perspective, the error occurs: Problems opening the problem: 'com.adobe.flexbuilder.editors. Mxml.ui.perspectives.development ' Someone has unfortunately been unsupported by Eclipse 3.5 Flex Builder 3. There are some bugs for this: Please comment on these bugs and vote for them. I have made one of the main issues related to displaying problems.

Iphone + main Window + orientation problem -

I have MainWindow.xib in the application. In the interface builder, I will rotate the main window from portrait to landscape and some UI Controlloles have been put over it. With this I save it. After this, when I run the application, although during design time I created everything in landscape mode always display things in portrait mode. Please help me The IB just sets your XIB files Is the visual controller that manages the orientation The default UIViewController or Uinaavigation controller has details on it. Specifically, you need to overload // override to allow orientation other than the default portrait orientation - (BOOL) should be metered by theUrrorTatronics Interface: Interface Orientation {// Returned Orientation Support for Return Yes (Interface Orientation == UIN Effect Orientation Portrait Upside Down? No: Yes); } For more information, take a look at the documentation for UIViewController.

SQL Server 2005:charindex starting from the end -

I have some string 'file.name', I want to capture some 'file'. To do this, I need to search for the last event. 'In a string. My solution is: Declare @someStr varchar (20) Announced @reversedStr varchar (20) Announce @ index int set @someStr = '001.002 003' set @reversedStr = reverse (@someStr) set @ index = lan (@sOSATR) - select the charandx ('.', @ Reversed STR) (@ some ST, @ index) Well, is not it too complicated? I'm just ready to use some of the files. Does anybody have a good idea? What do you need to do with it ?? Do you need to catch the letters after the last chance of a given delimiter? If this is the case: Reverse the strings and search using the usual CHARINDEX: Announce @test negotiation (100) set @test = 'some.file Name 'declare @ ruchars varchar (100) set @reversed = reverse (@test) select reverse (SUBSTRING (@ in return, CHARINDEX ('. ', @reversed) +1, 100)) < / Pre> You will rece

python - Get physical map location of object based off user input -

I am getting user input in a local milestone python application. With this data I use Google Maps I'm trying to get the longitude and latitude of my object. I'm trying to work with Google gdata api for the map, but I did not find any way to get long and late data from a search query while working in Python. I am using the exact same way that my problem will solve the dragon. Are you trying to geocode the road or POI (status of interest)? [2]: G = Geocodors. Google (GOOGLE_MAPS_API_KEY) [3]: (location, point) = [in] G.geocode ('Eiffel Tower, Paris') http: //maps.google.com/maps/geo? Q = Eiffel Tower + 2C + Paris & amp; Receiving output = km L & amp key = XYZ ... [4]: ​​Print point ------> Print (point) (48.858204999999998, 2.29499)

linux - Is an entire process’s virtual address space split into pages -

ध्यान दें: मैं वर्चुअल मेमोरी आवंटन के एक उच्च स्तरीय अवलोकन का अध्ययन करने का प्रयास कर रहा हूं क्या एक संपूर्ण प्रक्रिया का वर्चुअल पता स्थान, किसी विशेष आकार के पृष्ठों में विभाजित है: .text .bss .data क्या यह यह भी ढेर स्थान और स्टैक शामिल है - या यह हमेशा गैर-पृष्ठ योग्य है? पहले ध्यान दें कि "पृष्ठ" केवल एक पते की जगह के क्षेत्र हैं जो क्षेत्र "गैर-पृष्ठ योग्य" (जिसके द्वारा मुझे लगता है कि इसका अर्थ है कि इसे डिस्क पर स्वैप नहीं किया जा सकता है) अभी भी तार्किक रूप से पृष्ठों में विभाजित है, लेकिन ओएस उन पृष्ठों पर एक अलग नीति लागू कर सकता है। सबसे आम पृष्ठ का आकार 4096 बाइट्स है। कई आर्किटेक्चर एक ही समय में एकाधिक पृष्ठ आकारों का उपयोग करने में सहायता करते हैं (जैसे 4K पृष्ठ 1MB पृष्ठों के साथ ही)। हालांकि, ऑपरेटिंग सिस्टम अक्सर सिर्फ एक पृष्ठ आकार से चिपकते हैं, क्योंकि अधिकांश परिस्थितियों में से कई पृष्ठ आकार प्रबंधित करने की लागत इस लाभ के मुकाबले बहुत अधिक है। अपवाद मौजूद हैं लेकिन मुझे नहीं लगता कि आपको उनके बारे में चिंता करने की

'zip' in Erlang -

I'm wondering if the standart erlang library has a ready implementation of zip-functions. Something like this: Zip ([H1 | T1], [H2 | T2], ACC) - & gt; ZIP (T1, T2, AC ++ [{H1, H2}]); Zip ([], [], ACC) - & gt; ACC In the list module there is one: Gt; Lists: zip ([A, B, C], [1,2,3]) [{A, 1}, {b, 2}, {c, 3}]

linux - Backing up (and restoring) a Plone instance -

I have a plan installation in my home directory under Linux i ~ / Plone . It was created from the deputy distribution of the plan from its website. So Plone compiled his dragon and it has been bundled with Zope. Please tell me which files are required to backup: 1) Backup all data 2a) Restore back-up data in strong> same version , but is located elsewhere. 2b) I thought that maybe it's a good idea to back up the entire ~ / backup, Plone / The zinstance directory, but I see thousands of files of / home / me / Plone /...//>, even the file zinstance / var / filestorage / Data.fs Given (!!!) Can this be true? I have received the resource , but it is not specific enough. is the only directory that usually contains variables data var / directory (data, logfile). Parts / * will be generated again, for example. And even simple, usually you only need to back up the var / filestorage / Data.fs file: your "ZODB" database in one All your data

c# - MVVM Command Binding -

I am trying to learn the MVVM pattern. The main problem is that I am learning that where should I make, declare and force the command object. 2 example: I have a main form that works like a switch board or main menu appears in the salts button 1 and see 1, Select button 2 and see 2 Is displayed. great. Now I want to return to the main form so that I need a button on scene 1 (and see 2) called "Main menu" Where should I define command and command handles so that I can tie in the "ShowMainMenu" command? I can make them in View2ViewModel but I do not have access to show main view? Or, I can make a theme in the main visual model, but then how do I wrap them in the hair visual model? (I am using Relay Commands object as per MVVM Recommendation and they do not bubble over parent.) I have a visible view on a single main window view There are two user controls, call them on Main View, UC1 and UC2. Each of them has ViewModel MainViewModel, UC1ViewModel, UC2View

compiler construction - A proposal to add statemachine support to C++-like language -

As part of my working day recently, I am learning IBM Rapsidi and it is from UML to C ++ I'm using to create code. Tomorrow it hit me that it would be good to think about adding state machine support to my C ++ compiler, so I put some notes here: To do this My motives for this are: It seems like a calm idea. The compiler may do better semantic probes (with better error checking) than the current concept / general C ++ compiler. There are several customizable possibilities available when the compiler understands the state machine structure itself. I can try to increase my grammar by leaving something like motion to see how well it works. What is your opinion about the proposal? Is it readable? Does it seem worthwhile? Edit: Thank you for the answers that recommended specific libraries to the state machines, but this was not my question. I have applied several state machines, which I have written. And both are using libraries and codes. I was really looking f

actionscript 3 - Database access with Action Script 3.0 -

I want to create a program for writing and accessing a database. How can I do this using ActionScript? There is no possibility of the action script to access the file system within the flash player alone. To do such a work, you will need a server-side language, such as php. The action script will then only communicate with those scripts and send and receive information. It works just like a simple HTML website, just with the content displaying Flash.

language agnostic - Technical non-terminating condition in a loop -

Most of us know that there should not be a non-terminating condition in a loop. For example, there is a non-termination status in this C # loop: i of any value i is a clear logic error. Zero CountByTwosStartingAt (byte i) {// If I am also, then it does not exceed 254 for (; i & lt; 255; i + = 2) {console .WriteLine (I); }} Sometimes there are cases of edges that are extremely unlikeley, but technically non-exit status (Stack overflow and out-of-memory errors on one side) would be formed is. Suppose you have a function that is the number of sequential zeros in the curve counts: int CountZeros (stream) {int total = 0; While (s.ReadByte () == 0) Total ++; Total return; } Now, suppose you feed this thing to: class InfiniteEmptyStream: stream {// ... other members ... public Read override int (byte [] buffer, int offset, int count) {array. Clear (buffer, offset, count); // Number of output return zero; // Never Return -1 (End of Stream)}} Or more realistically, pos

jquery - Entity Framework WCF -

[ऑपरेशन कॉन्ट्रैक्ट] [WebGet (RequestFormat = WebMessageFormat.Json)] सार्वजनिक सूची & lt; DataModal.Employee & gt; GetCustomers () मैं कर्मचारी की सूची वापस करना चाहता हूं जो इकाई मॉडल ऑब्जेक्ट प्रकार है I कैसे उन्हें डिफ़ॉल्ट रूप से क्रमबद्ध किया जा सकता है या कुछ कोड लिखने की ज़रूरत है मैं jquery का उपयोग कर रहा हूं। आपको [DataContract] पर डाल देना चाहिए आपकी संस्था वर्ग और [DataMember] प्रत्येक प्रॉपर्टी या फ़ील्ड पर विशेषताएँ जिन्हें आप क्रमबद्ध करना चाहते हैं यह WCF में काम करने का मानक तरीका है एक बार जब आप ऐसा करते हैं, तो आप अपने सूची & lt; कर्मचारी & gt; को एक WCF सेवा कॉल में क्रमबद्ध कर सकते हैं।

VBScript And Windows Mobile -

Due to PowerShell I started learning VBScript, but I want to know that I can run VBScripts (** .VBS *) Thanks to a Windows Mobile device. I do not think Windows Mobile supports it. This question can be of your interest.

objective c - getting the specific ip location for iphone application -

I went through the following link & amp; I have also tried it (but it is not recognized by apple) Ok tell me what I need .. .. I just want the user to tap on the "wifi" button. The reports stored in documents can be used by other PCs using WiFi, which I can do in my How is this possible? Thank you in advance for sharing your knowledge. Sea. In my app, I use the local information in and out of the phone. You run the server and the out-of-box, this document indexes all the files in the directory. To do what you want to do, you have to edit the code to return some other types of data format (XML is probably the easiest) to get that app from your app Call from within CocoaHTTPServer can also easily take the right post out of the box, so that you can post an XML response as well. After thinking about it, Kokohttypeer is best to run on the computer side. Then the iPhone can send information to the computer where code is easy to handle and you have

javascript: redirect to a page? -

How do I use jquery [javascript] for another page? Or url the browser urlfield and hit enter? There is nothing to do with jQuery, just: window .location.href = 'whatever.html';

mysql - Implementation of Comments, Is there any best practice for this? -

I need to implement the comments feature on a custom coded social networking website. What would be the best practice to implement it? To create a global comment table, the comments need to be implemented on various pages like video, pictures, albums, etc. Collect comments on the basis of your comments type, along with fields, and on the necessary page. commentid int (10) userid int (10) comment_type ENUM ('video', 'image') comment varchat (200) parent int (10) Or are you making separate tables for each comment? I will not do this in such a way that I will use sub-type on the other side. Create a basic parent table named (for example) content (for example); There are child institutions for video, pictures, albums, etc. Content; The content in the comment is a foreign key of the ID. There are three basic plans for applying subtypes: Create a separate table for each subtype; Create a table called Content with the subtitle of the video, al

c# - Using RegEx to find and replace doubles -

I want to replace all double tokens in the string with the double value added to the "c" letter. Is there an easy way to do this? I thought the way of regular expression is For example, I want to change treand60 (12.3) / 1010 + 1> 1010 treand60 (12.3c) / 1010c + 1c> 123c Any suggestions $ _ = 'treand60 (12.3) / 1010 + 1> 1010' ; S / \ b \ d + (:. \ \ D +)? / $ & Amp; C / G; Print; # Output is 1 or more digits and then "treand60 (12.3c) / 1010c + 1c> 1010c" \ d + . \ D + 1 or more digits after a decimal point is (?: ...) is the last ? means "match zero or one of these" (i.e. this is optional). And \ b means only on the boundaries of the word (it prevents matching of something like "Hello123" because the number comes straight after the word letter). Here is the C # equivalent: system. Text. Regular Expression; // ... string input = "treand60 (12.3) / 1010 + 1> 1010"; Reggae R

linux - What exactly is the difference between multi-threaded processing and parallel processing? -

The single core CPU or a CPU machine can not parallel processing. True / false? In spite of several processes running a single thread in the single core single process CPU, many threads are running in spite of (including sleeping threads) at any time . right wrong? Sorry about a lot of questions, they all are related. In a single core CPU (without hyperthreading) only one thread will actually be implemented, yes. However, it is not fully related to parallel processing. For example, you can have three functions to get: What is doing a lot of network activity What is a lot of disk activity which is doing very CPU activity Running in threads using these three parallel can definitely give a performance improvement on a core machine Heavy-CPU The activity will have to wait when any of the other activities A few more data to process, but overall effect is parallel processing. This is basically because the CPU can have "other things" without (the disk

cluster computing - Condor, Sun Grid Engine, or something else? -

Whether I am trying to work or not that we have a Condor or Sun Grid engine on work (or possibly something else) Should come out. We have several unused WinXp workstations hopefully we can use the on-line awake, run all of our jobs, and then switch off automatically. We mainly want to run Matlab, Java, or Python simulations for metallic-carlo or parameter exploration. With my limited knowledge of Condor, it seems that using the VM universe can be a convenient way to take care of the snapshot without modifying the existing code. Is there anything better than a cone for SGE or such work? I will start with Condor This is a great support for Windows, and newer versions include wake-ons - Built-in support to send LANs in a very configurable way when jobs can be run on some machines. It can also turn off machines based on user-defined policies.

testing - Android tests without emulator -

Can some Android tests be run for example: Android Test CAS without using emulator? To run an Android apk file, you need an Android emulator or Android device to run APK files, which is used to test the content of other APK files, Android Test Season Sub - Implementes the clauses.

ruby - Nokogiri how to get the parent text and not the childs text and reference the text back to its parent -

मान लें कि मेरे पास यह नमूना है: पेज = "& lt; html & gt; & lt; शरीर & gt; & lt; h1 class = 'foo' & gt; & lt; / h1 & gt; & lt; p वर्ग = 'foo' & gt; नमस्ते लोग & lt; a href = 'http: //' & gt; हैलो दुनिया & lt; / a & gt; & lt; / p & gt; & lt; / body & gt; & lt; / html & gt; " @ नोड्स = [] नोकोगीरी :: एचटीएमएल (पेज) .traverse do | n | | यदि n [: class] == "foo" @ नोड्स & lt; & lt; {: नाम = & gt; N.name,: xpath = & gt; N.path,: text = & gt; N.text} अंत समाप्ति परिणाम n.text के लिए होगा हैलो लोकहोल्लो विश्व , मैं यह करना चाहता हूं एक तरह से मैं अभिभावक पाठ और उसके मूल पाठ प्राप्त कर सकता हूं, लेकिन उन्हें अपने टैग से संबंधित इसलिए परिणाम कुछ ऐसा होगा @nodes [0] [: पाठ] = "" @ नोड [1] [: पाठ] = [{:: एलिमेंटटेक्स 1 = & gt; "नमस्ते लोग",: एलिमेंट ऑब्जेक्ट 1 = & gt; ElementObject}, {: Elementtext2 = & gt;

cocoa - Setting Horizontal Line (NSBox) line width in Interface Builder -

I have an application that I am creating using a horizontal line (that is, NSBox Is only a special case of ). I have put the component in the interface, but what to do to adjust the thickness of the line NSBox has a setBorderWidth method, but when If it appears in the interface builder then it does not appear, I prefer not to do this manually, because I do not want to maintain an object to accommodate this object. Is there a way to set it up through the interface builder, which I remember? Or, if unsuccessful, there is a better way to put horizontal lines in your UI, can you control its features through the interface builder? On the attribute pane of the inspector, set the threshold type to custom, then on the shape panel, the border width Set as required.

.net - Defining event handlers -

मैं एक घटना (घोषित समारोह) को परिभाषित कर सकता हूँ: MyElement.Keyup + = MyDeclaredFunction मैं भी इसे इस तरह से (अनाम प्रतिनिधि) परिभाषित कर सकता हूँ: MyElement.Keyup + = नया प्रतिनिधि (ऑब्जेक्ट प्रेषक, इवेंटगे ई) {} ; मैं इसे इसे (लैम्ब्डा) की तरह भी परिभाषित कर सकता हूं: MyElement.Keyup + = (प्रेषक, ई) = & gt; Myfunction ऐसा करने का सबसे अच्छा तरीका क्या है? एक मामले की घटना के लिए घटना घटना की घोषणा के साथ पाया जाता है ... दूसरे में वे अलग हो जाते हैं। मुझे विधि 1 पसंद है क्या कोई मुझे बता सकता है कि क्या पेशेवर और प्रत्येक विधि का विचार हो सकता है? तरीके 2 और 3 समान हैं विधि 1 में आप बाद में ईवेंट से सदस्यता समाप्त कर सकते हैं। विधि 2 में आप ईवेंट से सदस्यता समाप्त नहीं कर सकते। मैं कहूंगा कि यह मुख्य अंतर है।

emacs - Configure flymake to use specific directory for temp files? -

I am looking for documentation and trying to customize and do many things, but it does not matter What I do Flimemac always gives its temporary files the place in the directory that keeps them in the directory. The main reason this is a great deal, because when I'm taking action through my programs using GDB, sometimes I will get an STL file, or other file in a non-user directory Show. Often it causes my GDB process to stop responding due to some reason, which means disable me in the beginning and then globally, or disable it globally or hopefully I have any other Do not be afraid of files in my MACACS process. Is there a good way to fly like always make your temporary files ~ / .emacs.d / tmp ? Save the latest version of Emacs only "inplace" to save "Intemp" a quick hack:

Getting a token for Windows Azure -

We are looking at Windows Azure, but getting tokens is now difficult, at least it is what I Seeing Web Search Anyone tries to do this or can know how to speed up that process? How long does any idea take? Any help was appreciated // :) If you have a If you are a US resident, you can get a code directly. Go and you get your token instantly, they are only 500 so early.

html - Problem with character encoding of ' -

Why does this page show one? In the sentence (at least on my Firefox) separates the abstract of an object from its implementation while I utf-8? Because the site declares UTF-8 as its content type, but < / Code> is an ISO-8859-1 encoded character, switch your editor to UTF-8 and type it again (recommended method is the use of these institutions).

attributeerror - Python attribute error: type object '_socketobject' has no attribute 'gethostbyname' -

I am trying to do this in my program: dest = socket Gethostbyname (host) I have included this line: socket import at the beginning of the file from < P>. I am getting this error: Attribute error: object '_socketobject' has no special properties 'gethostbyname' I am running Vista 64 bit Can there be a problem in my OS? I've changed my firewall and everything. you shoulod import socket dest = socket. Gethostbyname (host) or by socket import use = dest = gethostbyname (host) focus Give: The first option is so far recommended.

javascript - help with jquery update content in html -

I use jquery ajax to get data from php file. data = & lt; Option & gt; Peter & lt; / Options & gt; & Lt; Options & gt; Maria & lt; / Options & gt; I want to use jquery to keep this data after the first option I can not use HTML () on selection because then the first option will be deleted. Edit: I can not use the append because then when I make another request and the data is: data = & lt; Options & gt; Michael & lt; / Options & gt; & Lt; Options & gt; Eric & lt; / Option & gt; Peter and Maria will still be in the selection list. How can i I have a & lt; Div id = addhere & gt; & Lt; / Div & gt; Use the first option and then html () but it does not work. strange. How can I solve it? Save the original option in a variable and add the AJAX response together with the original option Work Demo: (Editable) Source: & lt; Id = "name" & gt; & Lt; Opti

java - Interoperability by using Spring and Hessian ? Is it possible? -

The Spring In Action Book states: Hayesian, such as RMI, to communicate Binary message uses between customer and service, however, unlike other binary remoting technologies (such as RMI), binary messages are portable in languages ​​other than Java, which includes PHP, Python, C ++, and C # . (316) Can you give me some advice on how to get it? That is, using PHP, for example, I can read Hesien messages. From the list:

rest - PHP using CURL: is there a way to emulate a cookie instead of saving it to a file? -

I use a restore API service that uses a variable named session_id to be stored in a cookie API And I complete it like this: $ ch = curl_init (); // Start curl handle curl_setopt ($ ch, CURLOPT_URL, $ url); // set target URL curl_setopt ($ CH, CURLOPT_FOLLOWLOCATION, TRUE); // Redirecting curl_setopt Allow ($ CH, CURLOPT_COOKIEFILE, '. / Cookie.txt'); Curl_setopt ($ ch, CURLOPT_COOKIEJAR, '. / Cookie.txt'); Curl_setopt ($ ch, CURLOPT_POST, TRUE); // set post method curl_setopt ($ CH, CURLOPT_HTTPHEADER, $ header); // set header curl_setopt ($ CH, CURLOPT_RETURNTRANSFER, TRUE); Curl_setopt ($ CH, CURLOPT_HEADER, TRUE); // Return the headers so we can get the session ID curl_setopt ($ CH, CURLOPT_SSL_VERIFYHOST, FALSE); // Prevent unverified SSL certificate error curl_setopt ($ CH, CURLOPT_SSL_VERIFYPEER, FALSE); // Stop unverified SSL "" $ contents = curl_exec ($ ch); Curl_close ($ ch); The problem now has been told many different times by many differe

python - Django - Populating a database for test purposes -

I have to populate my database with a group of dummy entries (about 200+) so that I can check the admin interface Saku 'and I was thinking that there was a better way to do this. Tomorrow I was trying to fill my better part of the day (i.e. in a bunch of my_model (title = "asdfasdf", field2 = "laksdj" ...) "in the X range (0,200): "Loops" and left because the way I expected it was not working I think I need to use it, but does not exist existing data in the database? Check this app Assume that you wrote your blog app (oh, your favorite!), The unit testing in Django went fine, and everything went very fast, even those ultra-long Also you have added several classified posts and it is still stable as a rock. You are quite confident that the app is capable and ready for live deployment right? Incorrect.

asp.net - How to detect/track postback in javascript? -

Detect / track / check postback in javascript (like asp.net page. Any suggestions? ASPX: input type = "hidden" id = "_ ispostback" value = "& Lt;% = Page.IsPostBack.ToString ()%> & gt; Client-side script: function isPostBack () {// function to see if a page is a postback-ed return document .getElementById ('_ispostback'). Value == 'True';} PS: I Is not tested, but I've already done something similar and it worked.

Static testing for Scala -

There are some good libraries for testing in Scala (,,). However, with the powerful type system of Scala, the critical part of an API developed in Scala is expressed steadily, usually being prevented by the compiler as some undesirable or unapproved behavior. So, what is the best way to check that somebody is stopped by the compiler while designing a library or other API? This code is dissatisfied to comment outside, which should be incompatible and then it must be tailored to verify it. A responsive example test list: val list: list [int] = list (1, 2, 3) // // list.add (" Chika-boom-boom ") should not be compiled Does one of the current test libraries handle issues like this? Is there any way people use that work? The approach I was thinking was to embed the code into a triple-coat string or XML element and in my trial the call was to the compiler. The calling code is showing something like this: should Or, on the lines of any type of script that call

Issues of replacing SharpSVN 1.5 dll to SharpSVN 1.6 dll -

We are using SharpSVN 1.5 dll for our source control functionalites. Our checkout works as followers in checkout and checkin Suppose I want to check a folder name test and it has 3 files file1.txt, file2.txt, file3.txt Step 1: - Checkout file from SVN repository 1.txt - Step 2: - Checkout file 2 from SVN repository TTE - Step 3: - Checkout file from SVN repository 3 dot During the checkout operation in file 1, the .svn folder is created in our work folder. This is a file named as entries in the .svn folder. This file contains the SVN repository and checkout file information (we can see it through Notepad). When the file2.txt checkout operation occurred (checkout in the same work folder) no new .svn folder is created. Sharpsvn uses the existing .svn file (last file checkout .svn folder) and file2.txt information in the entries file adds up. The same thing happened when checkingout file3.txt in the same working folder. During the checkin operation the first checkin file is 1.

c++ - Reopening a closed Piped read file descriptor? -

I use pipes to facilitate indirect communication. 0] and close again. Does anyone know how to do this? You can not open an anonymous pipe again if you really need it to open the magic again. , Consider using the named pipes, which you can open as often as you want and can be opened again. But before doing so, consider whether it is understandable at all.

actionscript 3 - YouTube video loaded into Flash MovieClip, can I get width and height? -

I am trying to load a URL video with the use of the URL on the Flash movie clip, gives. The video loads and I can manage it with my player, the problem is that when I try to keep it at any level, because I do not know its width As long as it is not started. I have tested it with 'event' .ENTER_FRAME But when the video starts it returns width = 10000 How can I know its width or height? Nominal width and height of the movie through the loader's contentLoaderInfo You can retrieve just the following: trace (loader.contentLoaderInfo.width); The nominal width and height of your movie is 640x480. However, you will see that the film is being scaled (probably by YouTube, it should be confirmed). Also, keep in mind that what YouTube has returned is a AVM1Movie object A AVM1Movie object is a SWF compiled under Action Script 2 (In the case of YouTube, most likely the Flash version 8). Interaction with the AVM1Movie object is more limited than a regular AS3

vba - Discovering Dynamics SL (Solomon) Customizations -

I am in the middle of an upgrade to an MS Dynamics SL (6.5 SP1) installation, and wondering if there is any easier The way to review the BSL / VBA code included in screen optimization or at least one method of being able to find each form containing customization To search each and every form of optimization (by type), enter any database Looks like SQL looks something like this (I leave the exact statement on the customer's site and rebuild it from memory): SELECT DISTINCT s.Module, s.Name Click on the Custom VBA C INNER Screen S. C. Screen id = s.Number WHERE c.Sequence = 300 selection of union variation S. Module, s. Turn on the Custom 2C Inner Screen by Name c. ScreenID = s.Number WHERE c.Sequence = 300 "Sequence = 300" means this will give the screen number and name where there will be an amendment for "all users" (500 for a specific user and 100 Ons will be for the third party add-on. Ons) Now, there is a custom VBA table where VBA customiz

.net - ClickOnce Deployment for different configurations -

इस सवाल का पहले से ही एक उत्तर है: < / P> 6 जवाब मैं वर्तमान में देख रहा हूँ हमारे WPF अनुप्रयोग के लिए क्लिकऑन की तैनाती और सोच रहा था, क्या प्रोजेक्ट फ़ाइल में प्रत्येक बिल्ड कॉन्फ़िगरेशन के लिए अलग-अलग उत्पादनाम और पब्लिशयूआरएल सेट करना संभव है? फिलहाल मुझे मैन्युअल रूप से प्रकाशित विकल्प में सेट करना पड़ रहा है, लेकिन किसी के लिए ऐसा करना भूल जाना आसान हो सकता है और हमारे प्रशिक्षण के वातावरण में हमारे आवेदन का टेस्ट संस्करण प्रकाशित करना आसान हो सकता है या इसके विपरीत। मुझे पता है कि मुझे एक ही पीसी पर क्लिकऑन एप्लीकेशन के कई संस्करण चलाने के लिए मेजेयूआई का उपयोग करते हुए अनुप्रयोग पहचान को बदलना होगा, लेकिन कम से कम चिंता करने की आवश्यकता नहीं है हर बार जब हम परिनियोजन करने की आवश्यकता होती है तो उत्पादनाम और पब्लिशयूआरएल प्रॉपर्टी के बारे में सही हो रहे हैं (हालांकि यह आदर्श होगा यदि हम आईडीई के भीतर से आवेदन पहचान का उपयोग कर सकते हैं!)। यह पता चला है कि आप प्रत्येक कॉन्फ़िगरेशन सेटिंग के लिए .csproj फ़ाइल में PublishUrl और ProductName सेट कर सकते ह

python - Unable to get Wacom events from /dev/input/event* -

I have created a pygtk program to monitor the keyboard position and mouse click in any application (i.e. only my application for). It uses evdev by Mica Dottie, which basically monitors / dev / input / event * for output and decodes the information in such a way that I can display information to the user. This program does not work for USB Wacom (nor Serial Wacom) while running USB keyboard and rats, but in the form of root, any of the / dev / input / * nodes for Wacom Also, I do not get any events to use it to come in the way. It's not just my voice, but they do not even get anything from the podcast "Meet the Gimp" (Ralph and Phillippe). Lives in the code. To test, you can run something like this: sudo ./evdev.py / dev / input / event0 < P> You should see the events that are coming in. For example, as you move the mouse or click on the keyboard, it connects to event0. This X that takes full control of your input device, you can not read the eve

Jquery - Change dynamic dropdown selected element -

I have a dynamically generated dropdown for which I need to change the selected value using Jquery. & lt; Selection class = "txtfield country" id = "ctl00_MainContentAreaPlaceHolder_personalInformation_country" name = "ctl00 $ MainContentAreaPlaceHolder $ personalInformation $ country" & gt; & Lt; Option value = "FJ" & gt; FIDJI & lt; / Option & gt; & Lt; Option value = "FI" & gt; Finland & lt; / Options & gt; & Lt; Option value = "FR" selected = "selected" & gt; France Metropolitan & lt; / Options & gt; & Lt; Option value = "GA" & gt; GABON & lt; / Options & gt; & Lt; / Select & gt; There is a way to use full idle (ctl00 includng ..): $ Jay ("# ​​ctl00_MainContentAreaPlaceHolder_DeliveryPersonalInformation_country Option [Value = 'Fr'] "). Ether ('selected', 'selected'); Is ther

merge - How to Run VBA Macro in Word Doc after being Merged by external application -

We are using XML or Word ML format from Office 2003. How do I obtain a macro after running a MS Word ML document merged by another application (not a word) that has been called by SIMS Capita. How can I get the macro to run after the merge, when the document is being previewed? Word-document does not know that it has been merged with any other application. The only way to come to my mind is to check the changes, when the doctor opens and runs the macro.

iphone - UIAlertview Button columns -

In the iphone application, we can set the number of columns in the UIAlertView like I have six buttons in the UIRreview, so how do I show it 2 columns and 3 lines if someone has done this, please share this how it will be done .. Any sample code will be of extra help A UIAlertView is just a UIView . Then you can add the button manually in UIAlertView in two column configurations, an example of adding UITextField s, but I'm sure you can customize it . Note that there are two buttons in UIAlertView that the apple is backed up -)

testing - What should a tester report? -

I have a web site that I'm making for a client now I have a tester on this project. I think the testers really need to! I can not test my code. I also appreciate the value of a new set of eyes. But what is the desire to report? It is easy to say that everything should be informed, but there is no need to filter any unimportant requests between me and the examiner, the tester does not know the system nor the targeted user is well . He is telling me the work, not the project manager. I think it will change soon, but until it does not happen, what do you recommend? It seems that our users have never used full before, and they are dumb in the form of rocks. The problem I have is that the tester suggests that everyone is being accepted automatically and I have been handed over I have many issues which I leave my jaw and say, "Are you serious? Should this be an issue?" ex: Need to add text to the top page that says "* = Required" for the required fields.

jquery accordion, opening a box based on href -

I am trying to open an encoding based on a link that sends me to the page This is my Url services.html # branding I use the following code in the head: and looks like an Erdian: B & gt; Any help would be greatly appreciated ... < Oh, I see that Jeff said that the current UI version has broken, but I had a solution to use the current version ... HTML gt; h3 & gt; & Lt; A href = "#Branding" & gt; Branding & lt; / A & gt; & Lt; / H3 & gt; & Lt; Div & gt; & Lt; P & gt; Your business includes a & lt; / P & gt; & Lt; / Div & gt; & Lt; H3 & gt; & Lt; A href = "# print" & gt; Print & lt; / A & gt; & Lt; / H3 & gt; & Lt; Div & gt; & Lt; P & gt; Brochures & lt; / P & gt; & Lt; / Div & gt; & Lt; / Div & gt; script $ (function () {$ ('# accordion') .adrian ({collapsible: true, animated: 's

default scope in older rails versions -

All in the afternoon. I am working on a project written on Rail Project In newer versions, we can use an unusual method to create a default scope such as default_scope: order = & gt; 'Title ASC' How can the same / similar effect be achieved without upgrading the railway version? You can consider default_scope functionality in your project back-porting. I think the default_scope has been added. You only need to make changes. The other parts shown in the documentation and tests are those that you should consider adding but not necessarily.

linq to sql - Problem with Updating an Entity with a Timestamp Column via WCF -

We are trying to update an organization via WCF, and the unit has a timestamp column. When we try to update, we get the following data. Linker error, "A member calculated or generated by the database can not be changed." This message is talking about the timestamp column. If we try to update the same without using WCF, then it works fine. So this issue should be with WCF. We have the appropriate [datamember] attribute on the timestamp property for serialization. Randy Itemprop = "text"> This issue is actually nothing to do with the WCF. Is this really a SQL Server TIMESTAMP data type ?? You can not update those people - when anything happens in the row, then SQL Server will automatically update those fields. For more information, see "here" or "here". How do you handle updates to Linq-to-SQL data when you receive WCF messages? Can you show us some code for this? For example: Is that area / property data contract def

sharepoint - Adding a Column to a Generic List INstance during feature provisioning -

I am trying to create a solution package for a set of features within a SharePoint site. I want to create an example of a generic list (using ListInstance in Element Manifest) and connects through the activation code without any additional columns (by default they have only one title column). Is there any way to do this through CAML? Therefore, by now I am stuck with the idea of ​​creating a custom content type, but that means that I should have a different feature which is active at the site level, first to deploy the content type. I believe what you want, snippets: & lt ;; - Add a field context for the custom field .--> & lt; FieldRef id = "{AD22016D-BC8B-4631-A0A3-5E84C6CFA7EC}" name = "favorite" color "required" = "true" ShowInNewForm = "TRUE" ShowInEditForm = "TRUE" /> : field type = "option" name = "preferred color" DisplayName = "preferred color"> &

php - Another tricky preg_match -

Only one paragraph contains "stop word", it needs to be seen, stop words are in the array below. I have the formula: $ pattern_array = array ("beforehand", "min", "stir", "summer", "put", "beat "," Bowl "," pan "); Foreign currency ($ pattern_array $ as pattern) {If (preg_match ('/'. Pattern $. '' / I ', $ paragraph)) {$ stopwords = 1; }} Which works quite well, but the word 'panko' is termed as a stop word for the term 'pan'. So the reges will be something in which it has a place or a new line is up and the ending in the full term / space / comma / (other non-eligible objects). How do I tell PHP other than this? As soon as a stop word is detected, to exit the loop? Thanks guys, learning to slow down as I go! Use \ b (preheat | minutes | stir | heat | Put | bowl | pan) \ b In the same way as your regex, you only need a regex (no loopin

delphi - TEventObject & IE tabs gives fatal error -

After I try the document using this code : = (IWebbrowser2 PDisp). Document like IHTMLDocument2; Body: = Document Link: = Document.links; I: Start (Links.length-1) from = tmp: = (Links.item (i, 0) as iHTMLElement); Tmp.onclick: = TEventObject.Create (MyProcedure) as IDispatch; // this line end; Apart from E: Exception Show Message (E. ClassName + 'has been raised with error message:' + E. Message); End; In the documentComplete event of an IE web browser, it works fine, but when I open a new tab, I have to face a Microsoft Internet Explorer and "error "Has to be shut down. In the code given above // ​​the line marked with this line is the one which is creating it (I commented it and did not show this error). Code: TEventObject = class (TInterfacedObject, IDispatch) Private FOnEvent: TProcedure; Protected function GetTypeInfoCount (Calculate Out: Integer): HRESULT; Stdcall; Function GetTypeInfo (Index, LocaleID: Integer; Out TypeInfo): HRESULT; Stdcall;

Rails plugin require issues -

I have a problem creating a Rail Plugin, call it maplag. The plugin is very a rake work, but with a library that uses rack work. Problem files are required to say that this rack is functional: namespace: emplog function: mpllog :: indexer to create New End End This will not recognize continuous mapping, so I thought I needed it. 'mplug' namespace is required: mplugs work: to create mpllog :: indexer. New End End But then I get this message. No such file to load - mplug So, okay. Then try to give the path to the plugin. 'vendor / plugins / mplug / lib / mplug' namespace is required: applying task: mpllog :: indexer to create New End And Although it works really, except that I think that's a bad way to do this, now I need to have files in my plugin like I like Rail The root was in the example: The 'emplug / indexer' is required for the module empling end now it should be: module module end in the 'vendor / plugins / mapl

How to disable default asset timestamps for some assets in rails? -

There are some image assets on my site that will always remain constant, and therefore do not require a timestamp, which is the image. Do not add timestamps to some assets? Why not just use regular HTML & lt; Img & gt; Elements for those pictures? It will also be a little faster by going through the rail assistant.

google chrome - JQuery UI .show('slide') not animating correctly -

I am trying to create a diva that slides the mouse well on you "trigger". It is fully visible, then it is disappearing quickly and again in sliding out. I am unable to understand the reason for this behavior. I can put a little sample if needed. The trial case is up, it's happening on all major browsers except IE6. HTML: & lt; Div class = 'wrap' & gt; & Lt; Div id = 'navtitle' & gt; NAV & gt; & Gt; & Lt; / Div & gt; & Lt; Div id = 'nav' & gt; & Lt; Div id = 'navlist' square = 'circular curvyRedraw' & gt; & Lt; Div class = 'top' & gt; & Lt; Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Home & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Single & lt; / A & gt; & Lt; / Li &a

vb.net - Visual Studio AutoComplete simulates enter being pressed when selecting -

Visual Studio offers built-in auto-complete functionality for well-known text boxes and combo boxes. I am using Autocomplete Suggestion Method which gives the user a list of options based on their type. The problem I am having is that when the user makes a selection (via mouse) VS The text gives the text selected in the text box and it also simulates the key being pressed on the text box. The entered keyword event in my program is used to enter a COM port in the text box for it to be able to work as desired, the user should be able to choose the complete option And then add it so that they can change the settings. Is it possible to stop it from triggering that event or to stop it? I am unsure whether it is possible or how to determine the origins of a keyboard Here is the code for the keypages as well as the keypages event: Private subtxtInput_KeyPress (ByVal, as in this object, ByVal e System.Windows.Forms .keyPressEventArgs) handle as txtInput.KeyPress then e.KeyChar = C

Should I tell NHibernate/FNH to explicitly use a string data type for a param mapped to a string column? -

Using one of my groups, the user is making a few long search queries based on different inputs. We have been mapped NHibernate via Fluente Nibbernet, and apart from some minor mistakes, all are running well. One issue we can not solve in this search case is that the special parameter is creating NHibernate SQL which treats the input as an int when we have a clear string is needed. We have mapped string properties in a nvarchar (255) column, which contains most integer numbers, such as "temporary" or long number such as 4444444444444444 which is beyond the int range. In the test, I have seen a few things: 1) If I put 0 for the incoming value, then the NAH generates SQL param as a string; 2) If the value can be actually converted to an integer, then the resultant SQL behaves in the same way. In the case of # 2, if I run the generated SQL directly through the SQL server, then I get an exception when There is a query on a non-integer value (i.e. the example listed above).

user interface - How to make a GUI that works on all window mobile phones? -

So far, I am using PDA emulator in Visual Studio 2008 (I am using Windows Mobile 6.1 Professional SDK ). So I just dragged and removed most of my GUI component into the form. In an example I made a panel, then I dynamically generated the label in this panel with the position of some locations. Then I put it on my HP PAQ 110 classic PDA and saw it fine and everything then I was seeing through simulators, one of them was called a professional class. So I decided to run it and when it started my program, it looked like a bullshit. I was missing the label, the control was missing and it just seemed terrible. I thought that maybe it would then how do you create a GUI that will work well on all mobile phones (or at least most of them) < P> Is the number of mobile phone type x? Like emulator emulates to a PDA and it works on my HP one so I'm assuming that all windows mobile devices have the same screen size of pdas. Then the next question is how do you make the cont

Hallway usability testing: How much of the UI do you actually make functional? -

Most of you make your app completely or fully functional while doing the usability test? Or do you just make sure the link or flow chain properly? Or do you just come on paper and go with it? I would like to test at the beginning of a prototype and am trying to find a good balance. But at the same time I worry that some non-functional parts can not really give representative results. Thank you. Applicability testing, hallway or otherwise, only requires functionality that you need to test. In more utility tests, you should go with its prototype and make your own development at that point where it can answer those questions. For example, if you need to test if users understand the order of the sort order for the table, then all you need is a paper picture in the table that shows the sort signal (table content blurry) and Describes how the table is resolved. If you need it, then all you need is a bunch of web page, empty except empty, which is linked through the navigation me