Posts

Showing posts from January, 2015

javascript - change the css of file_field? -

I want to change css for file_field. Instead of showing the original browse button I want to use the Simple Upload button to upload the file. How can I change the file_field's CSS and set the second image on it? So this file will look like a button instead of upload control. View & Lt; Div class = "fileinputs" & gt; & Lt; Input type = "file" name = "upload" id = "upload" class = "file" onchange = "this.form.submit ();" / & Gt; & Lt; Div class = "fakefile" & gt; & Lt; Input class = "upload_btn" /> & Lt; / Div & gt; & Lt; / Div & gt; & Lt;% end% & gt; CSS div.fileinputs {status: relative; } Div.fakefile {Position: Absolute; Top: 0 pixels; Left: 0 pixels; Z-index: 1; } Input.file {status: relative; Text align: right; -Moofness: 0; Filter: Alpha (Opacity: 0); Opacity: 0; Z-index: 2; } Input.upload_btn {Background: Transparent UR...

How to extract one or several characters from a Chinese font? -

I want to use @ font-face to import Chinese fonts on my site. But as we all know, Chinese fonts are always big. Since I will not use more than ten Chinese characters once, I wonder how can I remove many letters from Chinese fonts? Tks ~ Expert Setting: Custom allocation li> Single characters

browser - is the autocomplete property, a standard html property? -

I understand that "autocomplete" is a standard asset or not ?! By the way: And can I use it in FF, IE, Opera ....? If so, which browsers and versions of those support? Is this browser a cross property? Regards. Sam It was part of webform 2 (html 4.01). I'm pretty sure everyone supports it Also listed in html 5 spec

html - Do divs expand vertically to fit their children divs? -

I have trouble developing my division vertically with my children My There is something like: & lt; Div class = 'headerwrapper' & gt; & Lt; Div class = 'header' & gt; & Lt; Img ..... height = 100 & gt; & Lt; / Div & gt; & Lt; / Div & gt; In the firebug, there is a height of 100 in the header divisor, the height of 0 in the header divider divisor. The image is visible in the diu below .. .. There is no definite height on the drawer's diwi. is confused thanks- jonathan See if you have a header divi set float. When a child element floats and its parents do not, then it gives the reason for falling to the root element of the "0". This is a very good description problem about halfway down the page.

php - Ajax form validation refuses to work -

I am attempting to validate a form using Ajax and it will not work for me, so before That I mess up completely from top to bottom I thought I would ask for some help before continuing, anyone who can help in advance :) & lt; - access.php & lt; --logIn.php I am sorry that I can not expand this problem much because I do not really know where I went wrong because I am relatively new to the concept of AJX, but I think that problem is $ .post function in access.php I think you are missing $ query = mysql_query () such as 20 in login.php Between 21 and and you can not use the header ("location: clientsTable.php"); After sending data P> Does this help?

c++ - Outer class containing inner class - instantiate the inner class as a member of the outer class -

Currently I am trying to compile the following code: terminallog.hh #ifndef TERMINALLOG_HH # defined TERMINALLOG_HH #include & lt; String & gt; # Include & lt; Sstream & gt; # Include & lt; Iostream & gt; Class terminology {public: terminology (); Virtual ~ terminology (); Class warning {public: warning (); Private: Child lines; }; Friend class terminology :: warning; Protected: Private: Warning Warning; }; terminallog.cc // stripped code Terminallog :: Terminallog () (this warning-> warning;} Terminology :: Warning :: Warning () {This-> lineended = true;} // hidden code OK, as you're probably estimating ARDA, its failure ;-) My compiler is saying: G ++ src / terminallog.cc inc / terminallog.hh -o test -Wall -Werror file contains src / terminallog.cc: 8: src / ../ Inc / terminallog.hh: 56: Error: Terminallog: Warning Terminology :: Warning Src /../ inc / terminallog.hh: 24: Error: Conflict with Previous Declaration Zero Terminal ::...

ruby on rails - Rails3 help with joins scope -

There is a simple order - item app no ​​carriage need help with scoops connected to my report. Item polymorphic ( related_to: item qualified,: polynomial => true ) with products, services and policies. The policy is related to the seller. The goal is how much the seller was selling, but still be able to use the scope for the commands given below. Scope in my order model scope: closed_tode, lambda {where ("closed date and stop_data> gt; and close_data gt; and closed_data Something like this - Guess in the order model? Radius: with_policies, joins (: items). And the last result is by the seller being able to group and get the amount sold. & lt;% V in the @ order.closed_today.php_policies Group ("itemable.endor_id")%> & Lt;% = v.somehow_get_to.vendor.name% & gt; Sales: & lt;% = v.somehow_get_to.collect.sum (and: value)%> The price is the item field that assumes how much it has been sold for that item. I would l...

Java String usage -

संभव डुप्लिकेट: जब मुझे नया स्ट्रिंग () का उपयोग करना चाहिए और मुझे "" यदि आप सिर्फ एक स्ट्रिंग चर को इनिशियलाइज़ करने का प्रयास कर रहे हैं जिसका मूल्य आपको अभी तक पता नहीं है तो ठीक होना चाहिए। अंतर हर बार एक ही खाली स्ट्रिंग का उपयोग करता है, जबकि नया स्ट्रिंग () हर बार जावा ढेर पर नया ऑब्जेक्ट बनाएगा।

c# - How to pass data from child to parent view or between child views? -

Hi, I am currently migrating the Silverlight to the C # WPF project and I have stumbled upon a problem due to lack of Silverlight knowledge: My men page Xml that accepts multiple views, for example I want to pass a string from View 1 to programmatic pass passes from View 1 Based on the value that was made, the view 2 will change. I have searched for this topic for some time, I do not know how values ​​can be used / transmitted between scenes (or at least one optional - back For the parents, and then the other child?) Now, but I could not understand it. If there is any answer anywhere on my forum forum, my question has been poorly written. My question is stupid || In other cases, I am deeply sorry - do not bother / insult anyone Thank you. View properly, you mean navigation pages. There are several ways to do this by using the Navigation application, but I think the best method is using URL parameters (like html parameters) if your parameters are simple string values,...

c++ - How to make function argument container independent -

I am writing a utility function which can be a vector of elements (string, int, double, four) and one It looks like adding it to a single string and return it: template & lt; Typename T & gt; Std :: string convert2Str (std :: vector & lt; T & gt; Conte & Week) {std :: ostringstream sStream; For (size_tk = 0; k & lt; vec.size (); ++ k) {Sstream & lt; & Lt; Vec [k] & lt; & Lt; ""; } Return sStream.str (); } I would like to make this function more common: vector & lt; T & gt; . I have tried std :: vector & lt; T & gt; :: const_iterator this = vec.begin () before the loop and the compiler gave me an error: error: expected ; Before I was std :: vector & lt; Std :: string> gt; Const_iterator it = vec.begin () changes the above defintions to remove the error. Therefore, it seems that I am not following the correct syntax, please let me know what it is Second, the first argument is to make the functio...

xml - Basic fileread question in PHP / -

I have a 12 XML file, out of which I am removing a CSV file, out of which - I remove column 1 And add value to a tt.txt file. Now, I need to extract the value from this .txt file ... this data is written all the time ... but the problem is, when I $ Contents = fread ($ fd, filesize ($ filename)); fclose ($ fd); $ delimiter = ','; $ Splitcontents = explosion ($ delimiter, $ content); It reads only the first value of the IT file, every time a TTTT file is collected! I hope to understand the problem .. what I want, I want $ content to be added only to that new data ... instead of the file every time it reads Is ... Is there a way to get it, or what php fail? / This problem has been extracted from the TXT file- & gt; Computations Display- & gt; Writing in a new txt file The problem is that I can not read a new value from a middle value .. PHP always reads from the beginning of a file I think you need to store the previous file status. Call files...

windows - Open m3u8 Files from iOS on PC -

I call the TV screen on my iPhone where I show the TV locally on my iPhone, do it well I am I went to the application folder via SSH and found several .ts files and an M3 U8 file. M3 U8 file here Any way I can open that file on my windows computer How can I do that? Or how can I convert it? Greetings, Johnny This is a playlist (for M3U) In UTF-8 (for 8) I opened it with a text editor, it only references all your files: # EXTM3U # EXT-X-TARGETDURATION: 10 # EXT -X-Media-SEQUENCE: 482475 # EXT-X-KE: METHOD = AES-128, URI = "http://192.168.1.33:62497/key.dat" #EXTINF: 11, 13012386082_11_482473_.ts #EXTINF: 11 You can open .ts files with VLC: >

c - system() output to a char* -

int system (const char *) How can I send output I can order this command (say that the command is "pwd") in four * Its return is an integer but I want the result of the command to be sent in four *. You can use the command "pwd" in the form of "tempfile" directly to the output of the command pipe Can do. Another method is to use popen FILE * output = popen ("PWD", "R"); This will give you a file indicator where you can read the output.

php - Serious url rewrite problem -

I use the rewrite rule on one of my websites, it works well, but I Trying to use it on any other website but it is not working (both websites use the same URL structure) Do not show on the server on the page URL rewrite details: & lt; IfModule mod_rewrite.c & gt; Option + FollowSimemank Options - Multivites Revival Engine On Revivalbase / Rerealitium ^ View / ([^ /] +) / ([^ /] + / $ view.fip? ID = $ 1 & amp; Title = $ 2 [L] Rematerialized Rules ^ See / ([^ /] +) / ([^ /] +) $ View.php? Id = $ 1 and title = $ 2 [L] & lt; / IfModule & gt; Want to rewrite this link " Please do not get me right thanks ln -s /etc/apache2/mods-available/rewrite.load/etc/apache2/mods-enabled/rewrite.load or with Ubuntu: sudo ln -s /etc/apache2/mods-available/rewrite.load/etc/apache2/mods-enabled/rewrite.load

Android: FileReader unexpectedly throwing FileNotFoundException -

So I'm unexpectedly receiving a FileNotFoundException as you can see, before I call FileReader, I call FileInputStream which works fine. I have tried to put the filereader in my try / catch clause, but get the same result. I left the unnecessary lines for my question from this section (ultimately I also call LineNumberReader, although I removed it from the block because I am not even so far away.) string file name = "file.txt"; Try {byte [buffer = new byte] [128]; String tocet = new string (); TextViewView = (TextView) findViewById (R.id.textview); FileInputStream fis = openFileInput (FILENAME); The ///// file was found successfully here. Fis.close (); ToStr = new string (buffer); View.append (toStr); FileReader fr = New FileReader (FILENAME); ///// FileNotFoundExceptionThrownHere ////////// The stuff is here ///// fr.close (); } Hold (FileNotFoundException E) {TextViewView = (TextView) findViewById (R.id.textview); View.append ("File not found!"); } Grip...

iphone - UIActionSheetDelegate Warning for View Controller -

I have set up a UiXShet popup with just two buttons and assigned an action to one of them. The app compiles and runs and works properly but I get a warning: Warning: 'MyViewController' class does not implement the 'UIActionSheetDelegate' protocol - (IBAction) saveImage {UIActionSheet * saveMenu = [[UIActionSheet alloc] initWithTitle: @ "Save image to photo library" Automatically CancelTutton: @ "Dismiss" Destructive Button: Other No Button Titles: @ "Save Image", Zero]; [SaveMenu showInView: self.view]; [Left menu release]; And I signed the "Save Image" button: - (zero) Workshop: (UIActionSheet *) Clicked the ActionShut buttonEtindex: (NSInteger ) Button index {if (buttonIndex == 0) {UIImage * imageToSave = [imageView image]; // Optionally, save imageView.image // in the camera roll / saved photo album UIImageWriteToSavedPhotosAlbum (imageToSave, zero, zero, zero); }} Should I ignore this build warning? Or how ...

javascript - $(window).width() and $(window).height() return NULL -JQuery -

I $ (window) I want to get the size of the browser window using Width () and more $ (window). Hi () function Although this two returns are empty $ (window) is not zero, this "object" is returning I also have $ (document) .width () and $ .hight () , these two tapes do not return, they are returning specific values, but they are bigger than the window size. Any ideas why the $ window 2 values ​​are zero? Var image = $ ("#image"); var hiResImage = $ ("################################################################################## "text"> Like the commentators, I'm not sure why he does not work, but it does not work in vanilla jes and without pocket the window object In order to be able to get better luck with it, with JQuery versions, browser compatibility, etc. window.innerWidth // just the actual document window window winnerheight window.outerWidth / / Bro toolbar, status bar, etc. window.outerH eight I still reco...

JQuery transition from X,Y to X,Y positions -

I have some div that starts with X, Y coordinates for new X, Y coordinates. Actually I use .css () to set up new coordinates, but I want to add a transitional effect. Anyone have an idea? Thank you $ ('# your-element'). Chetan ({top: '20px', left: '50px'}, 1000);

r - How to round all values in a matrix? -

I use the following method to store all my relationships in the matrix: Code> corrs & lt; - cor (use dataset = "pairwise.complete.obs") But now I want to round the values ​​in two digits after a comma. How can I do that? I just got a round function, but it does not know how to implement all the values. Just as in your second question, the function ( rounds ) Use :) corrs & lt; - Round (Core (Dataset, Usage = "pairwise.complete.obs"), 2) For example: & gt; Goal (Core (car), 2) Speed ​​speed 1.00 0.81 d 0.81 1.00

java - Highly concurrent HTTP with Netty and NIO -

I am working to request http within a concurrent, threaded environment. However, my system breaks down completely at very low throughput. In almost pseudo-code: ClientBootstrap bootstrap = new clientbootstrap (new NioClientSocketChannelFactory ()) bootstrap.setPipelineFactory (new HTTP clientPipelineFattery ()); Channel Future Future = Bootstrap.connect (new inset socket address (host, port)); Channel channel = future Wait uncontrollably (). GetChannel (); HttpRequest Request = New DefaultHttpRequest (); Channel.write (request); For example, to create a request, I am creating a clientbootstrap, and from there (via some hoops) to write a channel HTTPRequest. All this works and is good However, in a concurrent situation, should every request go through the same hoops? I think that at the moment I am breaking things for me. Should I reuse the connection or my client should be completely structured differently? Apart from this: I am doing this in closure, if it does make a...

html - onclick event not working in JavaScript -

I have a JavaScript code that has an HTML page with a button. I have a function called 'click' (function) which click on the button. The code for the button is as follows: & lt; Input type = "button" onClick = "click ()" & gt; Button text & lt; / Input & gt; The problem is that when the button is clicked, the function is not called. What am I doing wrong here? Thank you Two comments: You should write & lt; Input type = "button" value = "button text" /> & lt; Input type = "button" & gt; Instead of button text, & lt; / Input & gt; You should rename your function. The function click () is already defined on a button (this limits one click), and gives a higher priority to your preference. Note that here are some suggestions that are simple, and you should not spend too much time on them: Onclick = "javascript: myfunc ()" do not use . Use the ...

nlp - MySQL routine for porter or porter 2 stemming algorithm -

I am looking for a port of portals or a port 2 which is a MySQL routine (user-defined function) Written algorithm is written. Yes. Work should be done. Note: I have not tried any one of these.

Creating a MIPS machine in Java/C/C++ -

All of us, I am in an assembly language and computer organization class. Recently I got an assignment for which I will create a program which emulates a MIPS machine in Java, C, or C ++. The program reads hex from ASM file and stores rows in an array so it is supposed to emulate the MIPS machine. I am searching around, but I do not know how to start. Does anyone have some idea or falsification code to get me on the right idea? An example of the file should be read: 24080019 2409001e 240a0023 01094020 010a4020 00082021 If someone can start right now The perfect way down that would be fantastic, thanks! First of all you have to learn to leave those instructions. It seems that they are 8 hex digits. It is good, because the MIP instructions are 32-bit long (a hex digit is 4 beats i.e.) So each in the file coropendas In line with an instruction Look at the format of the instructions given here: You need to keep track of some registers inside the machine. (You ...

c# - Advice on dynamically generating list -

I'm new to coding in ASP, so your patience with me is appreciated. I have created a user access request form that is working, but now I need to add a permission section for this. What is this that is 5 text boxes per line, but it only starts with a blank line, so if they fill a line, another blank one appears below. Then when a button is clicked, the values ​​are uploaded to my database. It should also be a populated population if a user already accesses the page. Can this be done? Note: I am using EntityFramework, in .NET 4, C #

New complete install of MySQL on Win7. Didn't prompt for username? -

After the initial installation, detailed Oracle Setup inspires me for a password, and to re-enter it, but never Do not ask what the user name should be. So I do not know what's mine. This is 7 years after the installation of MySQL on the Windows machine, and the process looks more complex. If this is any indication that I am in all this, just to see that I would have typed "MySQL" at my command prompt, and it was returned with "Error 1045 (28000)": User 'ODBC '@' Is localhost (using password: no) " I have a JDBC connection (I'm usually going through PHP), but I have yet to do tar- Web is not filled XM because I don Thanks for the help. root is the default user in MySQL.

Connecting Apps with Windows Azure Connect - Problem connecting -

मैं एज़्योर प्रशिक्षण किट में Windows Azure Connect के साथ कनेक्टिंग ऐप्स प्रयोगशाला का पालन कर रहा हूं। मैंने समूह और भूमिकाओं, और सक्रिय समापन बिंदुओं को सेट करने के लिए निर्देशों का पालन किया है। मैंने एसक्यूएल एक्सप्रेस सेटिंग्स को अपडेट किया है और सेवा को पुनरारंभ किया है मैंने स्थानीय समापन बिंदु को स्थापित किया है, जो निम्न पाठ देता है। मैंने एक नया विंडोज फ़ायरवॉल नियम जोड़ लिया है यह समापन बिंदु कनेक्ट करने के लिए कॉन्फ़िगर किया गया है, और Windows Azure Connect में अन्य संसाधनों से कनेक्ट कर सकता है। मुझे ब्राउज़र में भी यह त्रुटि प्रदर्शित हुई है। क्षमा करें, आपका अनुरोध संसाधित करते समय त्रुटि हुई संदेश: अंतर्निहित प्रदाता ओपन पर विफल रहा। आंतरिक संदेश: SQL सर्वर से कनेक्शन स्थापित करते समय एक नेटवर्क से संबंधित या इंस्टेंस-विशिष्ट त्रुटि उत्पन्न हुई। सर्वर नहीं मिला था या पहुंच योग्य नहीं था। सत्यापित करें कि उदाहरण का नाम सही है और SQL सर्वर को दूरस्थ कनेक्शन की अनुमति के लिए कॉन्फ़िगर किया गया है। (प्रदाता: टीसीपी प्रदाता, त्रुटि: 0 - ऐसा कोई हो...

update attributes - show error messages from two models when updating Rails -

I am updating the properties of two models with one model. begin user.transaction user.update_attributes! (Params [: Users]) @ board.update_attributes! (Params [: Board]) ActiveRecord Rescue :: record unauthorized termination end When user @update_attributes generates an error, the transaction is stopped and the error message is shown in the view . However, I want to try updating two users and @bird and get error message for both so that the user can fix all their mistakes once. How can I do this? Thank you very much earlier. You can do the following: User.transaction do @ User.update_attributes (Params [: Users]) @ Board.update_addresses (param [: board]) ActiveRecord :: Increase rollback unless @ user.valid? & Amp; & Amp; @ Board.valid? End will ensure that both update feature methods are run so that you can receive error messages for both objects. If an object is invalid, any changes will not remain in the database.

How to shard the Django User model/table? -

How can you push the Django user model so that the user records different databases / tables? Which modules and models and ideas need to be modified? Do I need to create a custom authentication backend? Is there a relatively painless way to do this? Thank you. It is difficult to design because it is designed in a proper malicious way. I believe that you are concerned with the number of institutions kept in a database? Otherwise, if scaling thinking, normal load balancers - web server - connection pooling - use database cluster setup.

iphone - Why my first item look like wrong? (see pic) -

Image
My problem first thing is wrong It's not like others Some code makes my table when I scroll down and first Scrolling the item is like other items, but before I load my view it is bad. - (UITableViewCell *) TableView: (UITableView *) TV CellFarrayAttaxPath: (NSINXAP *) IndexPath {{TableView Setting: Yes]; NSString * MyIdentifier = @ "MyIdentifier"; UITableViewCell * cell = [TV dequeueReusableCellWithIdentifier: MyIdentifier]; If (cell == blue) {cell = [[[UITABLE VIACL ALLOC] InitVithframe: CGRxeroRece Identifier: MyDenFIFEER] AutoEques]; } [Cell.textLabel setText: [m_pArrayData objectAtIndex: indexPath.row]]; Return cell; } [tableView setEditing: yes]; Do not be here. To see it, Toggle with WillAppear or, Better, Button.

actionscript 3 - Molehill Shader -

I am trying to understand the molehill and would like many tops by two matrix, say: output = theVertex * scalematrix * rotation matrix I would look something like guessing my top peak: "m44 vt0, Va0, vc0 \ N "+" mul op, vt0, vc1 \ n "; and I'll set the matrix with context3d.setProgramConstantsFromMatrix (Context3DProgramType.VERTEX, 0, scaleMatrix); Reference 3d.setProgramConstantsFromMatrix (Reference 3DProgramType.VERTEX, 1, Rotation Matrix); But its not working what I am doing wrong? I know that I can do the matrix several times before putting on the shader, but I am trying to understand the AGL. Cheers A m44 is matrix 4x4 floats , It takes 4 registers as each register 128bits (4 floats), then you have to load your rotation matrix in the vc4 register: "m44 Vt0, va0, vc0 \ n "+" mul op, vt0, vc4 \ n "; reference 3d.setProgramConstantsFromMatrix (Context3DProgramType.VERTEX, 0, scaleMatrix); Referen...

android - How to show activity from activity stack -

I need some help about the activity stack. In my app I have 6 screen users, / P> 1 - & gt; 2 - & gt; 3 - & gt; 4 - & gt; When I go to 4 screens I press the cancel button When a user clicks on that button, it should go to the second screen and When the user clicks the back button on the keypad, it should go to 1 screen which is already in the activity stack How to do this Please give me an example. just use FLAG_ACTIVITY_CLEAR_TOP when user Clicks: intent = intent to be new intent (activity d. This activity, B. class); Intent.addFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); StartActivity; When the user presses back: @KeyDown public boolean override (intccode, key event) {if (keycode == KeyEvent.KEYCODE_BACK) {Intent (intent) = new intention (activity d. This, activity class); Intent.addFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); Intent.addFlags (Intent.FLAG_ACTIVITY_SINGLE_TOP); StartActivity; } Return super.Condondon (keycode, event); } ...

jnlp - Java Web Start - update SOME users? -

Updates through JWS work for a lot of pain and help desk, because on some releases some percent of users are "stuck" in the middle and unable to launch the application without restoring. We are exploring a way to update only a few users and then push the new version forward for more of them. I do not have a way to do this directly with JNLP. The ideas we have so far include: Keep a new jar in the web directory. Update the JNLP launch file to these new jars. After one hour, return JNLP question: Does JNLP specify what will happen to previously updated users and will now hit the "downgraded" launch file? (Hard data please) 5 JNLP launches files and restores the application everywhere in the help desk, then update one file at a time (i.e. 20% of users at one time) Apply a server-side solution such as a CGI script above Apache, which will serve different versions of the JNLP launch file for different users depending on their IP. What do you see downsides in ...

Android Force Close -

In my application, whenever I have a certain accident, it shows that force close the application. If I click it to automatically restart the application from the page that crashed and it does not show some bad activities, invalid data and no records ... do you want to stop this force Can also help, maybe when the user clicks on that force, it should kill the application altogether and users will be able to relaunch themselves to avoid corrupt data cues. Can. The only thing you can do if you do not want to handle the error properly The reason is to make one register is about to allow it to catch all the exceptions that you have not been caught anywhere. It may help you recover from such situations. At least you can apply a log function there or something similar. However, I would advise you to try to fix the error in the first place in your code.

MySQL: ALTER IGNORE TABLE ADD UNIQUE, what will be truncated? -

मेरे पास 4 कॉलम के साथ एक टेबल है: आईडी, प्रकार, स्वामी, विवरण। आईडी AUTO_INCREMENT प्राथमिक कुंजी है और अब मैं चाहता हूं: ALTER IGNORE TABLE `my_table` अद्वितीय जोड़ें (` प्रकार`, `स्वामी`); बेशक मेरे पास कुछ रिकॉर्ड हैं- प्रकार = 'ऐप्पल' और मालिक = 'ऐप्पल सीओ' तो मेरा सवाल यह है कि कौन से रिकॉर्ड उस अल्टर टेबल के बाद बने रहने के लिए विशेष रूप से होगा, जिसकी सबसे छोटी आईडी है या जो सबसे बड़ी सम्मिलित है? पहला रिकॉर्ड रखा जाएगा, शेष को हटा दिया जाएगा: IGNORE मानक SQL के लिए एक MySQL एक्सटेंशन है। यह नियंत्रण करता है कि कैसे वैकल्पिक तालिका काम करती है अगर नई तालिका में अद्वितीय कुंजियों पर डुप्लिकेट हैं या यदि सख्त मोड सक्षम होने पर चेतावनी होती है। यदि IGNORE निर्दिष्ट नहीं है, तो प्रतिलिपि को निरस्त कर दिया गया है और डुप्लिकेट-कुंजी त्रुटियों के कारण वापस आ गया है। यदि IGNORE निर्दिष्ट है, तो केवल पहले पंक्ति को एक अद्वितीय कुंजी पर डुप्लिकेट के साथ पंक्तियों का उपयोग किया जाता है, अन्य विरोधाभासी पंक्तियां हटाई गईं हैं गलत मान निकटतम मिलान...

mysql - check expiry date for one month interval only -

मेरे तालिका में समाप्ति तिथि है। उदाहरण: यदि वर्तमान तिथि पूर्व है: 27-03-2011 मैं चार्ट उत्पन्न करना चाहता हूं यदि समाप्ति तिथि 27-02-2011 है मैं समाप्ति तिथि के एक महीने के समाप्ति की तारीख के एक महीने के बाद चार्ट को जांचना और जनरेट करना चाहता हूं I एल्गोरिदम: अगर () वर्तमान दिनांक & gt; समाप्ति तिथि और amp; amp; & amp; वर्तमान दिनांक & lt; 1-महीने-से-समाप्ति) {जेनरेट चार्ट (); तालिका 1 क्षेत्र प्रकार P> expdate date ex: 2012-01-20 जैसा कि मैंने समझ लिया आप उन अभिलेखों की एक सूची चाहते हैं जो पिछले महीने समाप्त हो चुके हैं: SELECT * से तालिका WHERE समाप्ति तिथि & lt; अभी () और समाप्ति तिथि & gt; DATE_ADD (NOW () INTERVAL -1 MONTH)

performancecounter - How to Get available bytes of Windows system using C# -

I am experiencing a problem while retrieving the system's available bytes through the system. Diagnostics namespace and I tried this code. DisplayConverterPC = new displayConverter ("memory", "available bytes"); Even if I'm unable to get access to the above coding, if I get byte available for the system which is not equal to the Task Manager counter. How can I find a solution for this? Thanks in advance. Rajesh Task Manager for Display Counter Names Tabs on Mapping of Column Names Seeing Given I say that you are comparing two values ​​that represent various aspects of memory usage: My guess is that you can get physical memory ('available bytes') with performance counter In comparison, the total memory value is comparable. The solution must either switch the display of 'committed bytes' to total memory, or to compare the data matching with the 'physical memory available' value in efficiency.

How can i display a nested list in a multiple select or with checkboxes in Rails? -

How can I display a nested list with many select or in the train in the train? My table looks like this: | ID | Parents Name | LFT | RGT | thanks ... You attempted this link For Demo

iphone - show ipad2 camera in fullscreen? -

I want to show UIImagePickerController in fullscreen mode for iPad2. presentModalViewController: does not work for me / P> Div> Use AVFoundation Framework, AVCaptureVideoPreviewLayer can then be set to full screen .

optimization - Need Clarification in Code Efficiency -

यह मेरा कोड है; int arr [10] = {1,2, 3,4,5,6,7,8,9,10}; // I को arr [i] का उपयोग करते हुए कुछ ऑपरेशन करने की आवश्यकता है I =! a। के लिए ( इंट आई = 0; आई & lt; 10; i ++) {if (i! = 2) एआरआर [i] का उपयोग करते हुए कुछ काम करते हैं; } ख। के लिए (int i = 0; i & lt; 10; i ++) [मैं]; } एआरएआर के लिए किए गए काम को पूर्ववत करें [2]; एक & amp; बी एक ही काम को प्राप्त करने के दो तरीके हैं। मुझे नहीं पता कि निष्पादन की गति और लेखन शैली के संदर्भ में क्या करना अच्छा है .. क्या आप कृपया मेरी इस में मदद कर सकते हैं। हमेशा की तरह, यह निर्भर करता है। यदि "कुछ काम करते हैं" तो लूप निष्पादन की तुलना में बहुत अधिक समय खर्च करता है विकल्प a)। यदि कुछ काम करना बहुत मुश्किल है 1 जोड़ने का विकल्प, विकल्प ख) तेजी से होना चाहिए क्योंकि लूप बिना सशर्त समान चलता है और इतना अधिक पाइपलाइन-अनुकूल है। P> एक तीसरा विकल्प लूप से पहले सरणी पुन: क्रमबद्ध हो जाएगा (ताकि "काम" -निर्वाचित सन्निहित हैं) और बाद में क्रमिकरण को पूर्ववत करें इस तरह दोन...

html - change default hyperlink properties in custom tag -

I have found the following .. How do I change the properties of the hyperlink text in blue in this example and underline black And not underlined? At very basic level, like this: a: Link {color: black; Text-decoration: None; } To make it specific to the link within your custom tag (including display: block to spread its code in the width of its container ): ab.sa:link {color: # 000; Display area; Text-decoration: None; } and to change the hover style: ab.s a: hover {background-color: # 000; Color: #fff; } If you want more information, then there is a tutorial on it that tells different pseudo squares.

how to get the value of json data using python -

This is my code: a = '' '{"title": " SSIS "," body " "Data": {"status": 0, "user name": "www", "userId": "433"}} '' 'a = eval (a) print a.title But this error shows: what can I do, thanks to you eval : & gt; & Gt; & Gt; Instead of using a JSON parser like the simplejson module should be used. A = '' '{"Title": "SSS", "Body": "wwwwï¼aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' = '# onclic =' Logout () '> ;; & gt;; & gt; "," Data ": {" status ": 0," user name ":" www "," userId ":" 433 "}} '' 'gt; & Gt; & Gt; Import Customization & gt; & Gt; & Gt; Parsed_data = simplejson.loads (A)> & gt; & Gt; & Gt; Parsed_data ['title']...

java - Difference between Hibernate update by Session.update and HibernateTemplate.merge -

मैंने अपडेट ऑपरेशन के प्रकार देखे: प्रथम: getHibernateTemplate ()। निष्पादित करें ( नया हाइबरनेट कॉलबैक () {सार्वजनिक ऑब्जेक्ट doInHibernate (सत्र सत्र) {session.flush (); session.setCacheMode (CacheMode.IGNORE); SomeObject ss = (SomeObject) session.get (SomeObject.class, आईडी); लंबे अगले = ss GetAndIncrement (); session.update (एसएस); session.flush (); वापसी नल;}}); और दूसरी कुछ ऑब्जेक्ट ss = loadSomeObject (); लंबे अगले = ss.getAndIncrement (); getHibernateTemplate.merge (एस एस); ये दो विधि एक ही हैं मैं जानना चाहता हूं कि कौन बेहतर और सुरक्षित है और क्यों धन्यवाद। पहले ऑपरेशन में ऑब्जेक्ट ss संलग्न है सत्र। जहां दूसरे ऑपरेशन में इसकी अलग इसलिए यदि आपके पास कोई अनुलग्न वस्तु है तो आप अपडेट का उपयोग कर सकते हैं। यदि आपके पास एक पृथक ऑब्जेक्ट हैं तो मर्ज का उपयोग करें जो सत्र को ऑब्जेक्ट पहले जोड़ता है तो एक अपडेट करेंगे। संपादित करें: आपकी जानकारी के लिए संलग्न (निरंतर) और अलग वस्तुएं: सीतनिद्रा में होना निम्नलिखित वस्तु स्थितियों को परिभाषित करता है औ...

r - Counting unique items in data frame -

I want a simple number of the number of topics in each condition of a study. The data looks something like this: subject conductor observer variable 1234 1 1 12 1234 1 2 14 2143 2 1 9 3456 1 1 12 3456 1 2 14 3456 1 3 13 etc. etc. This is a large dataset and it is not always clear how many unique topics contribute in each condition, etc. I have this data in the frame. What do I want cond of ss 1 122 2 98 Where for each "status" I get a count In that situation, unique SS's contribution is the number of data it seems that painful should be simple. plyr to use the ddply function Package: Required (plyr) df & lt; - data.frame (subjectid = sample (1: 3,7, t), cond = sample (1: 2,7, T), audience = sample (1: 7)) gt; Ddply (df. (Cond), abbreviation, Salt / Length (unique (subjectid)) Capacity 1 1 2 2 2 ddply Function cond variable, and produces the summary column NumSubs for each sub-data frame.

iphone - How can I know the values in CABasicAnimation keyPath -

मुझे कुछ कोड ऐसा लगता है: सीएबीएसीएसीएनिमेशन * एनीम = [कैबैसिकएनिमेशन एनीमेशन]; Anim.keyPath = @ "ट्रांसफॉर्म। स्केल"; Anim.fromValue = [एनएसएनम्बर नंबरएफ़्लोएटः 1.0]; Anim.toValue = [एनएसएनम्बर नंबरएफ़्लोएटः 0]; Anim.removedOnCompletion = नहीं; Anim.fillMode = kCAFillModeBoth; Anim.delegate = self; [Self.view.layer addAnimation: एनिम forKey: @ "scaleOut"]; और anim.keyPath = @ "transform.rotation.x"; जहाँ तक मुझे पता है, keypath एक जंजीर विधि आह्वान है। CALayer के लिए "transform.scale" एक aLayer.transform.scale है। "परिणत" कैलायर की संपत्ति है, "स्केल" ट्रांसफॉर्मेशन की एक 'प्रॉपर्टी' है लेकिन CALayer में संपत्ति परिणत CATransform3D है। CATransform3D में "स्केल" या "रोटेशन" नामक संपत्ति नहीं है मेरा प्रश्न यह है कि "पैमाना" और "रोटेशन" किस पैड से पहचाने जाते हैं? कोर एनीमेशन परतों के कुछ स्ट्रेट-प्रकार गुणों के खेतों (या छद्म क्षेत्रों) के सीधे संबोधन में...

seo - Help With 301 Redirection on Plesk Servers (eUk Host Specifically) -

I'm running around in circles here, I wonder if anyone can help. I have recently been running a static HTML website at Umbraco on a Windows Placak shared plan. I have to put 301 redirects for new content in new, but: For Umbraco will not receive a request, there is not a way to do this. I can not run on any server in .html files, which supports Plask Custom Error Docs. I was going to use the client side meta redirect, but was it not certain that Google could read these rights? I have not used it myself, but Umbraco looks like What do you want. The real trick will be all piping. Requesting .html files via ASP.Net I'm not sure that it can be done with your web host. But some tips can be found here: p.s You are right that client-side redirects will not help with SEO.

php - 360 grid -- Finish out row with odd number of records -

I'm trying to complete it with a 360 grid system: From the database, It is working perfectly on the product of 4 products on the whole, but if there are fewer than 4 products in the category, then the design becomes messy up, because the device has not stopped properly. The problem is that sometimes - There are only 3 or fewer products in the line. How do any of you accomplish this? For ($ i = 0; $ I 'Image']; if ($ i% 4 == 3) {echo ' ;' (title Sorry about, I did not know what this question is like :)) $ I = 0; $ i & lt; $ countprod; $ i ++) {$ curprod = $ products [$ I] ['name']; if ($ curprod! = $ Prevprod) {If ($ close_div) echo '& lt; / div & gt;'; echo '& lt; div class = "grid_12 alpha omega" & gt; ; & Lt; h2 & gt; $ Products [$ i] ['cat name']. '& Lt; / h2 & gt; & lt; ($ I% 4 == 3) {echo' & lt; div class = "grid_3 alpha" & gt; ; ...

Android: Application restarts sometimes -

I found a strange behavior in my app when I try to get data from the internet with a bad WiFi signal, then my There are some exceptions (IOException, SocketException). All these exceptions are handled in applications in the attempt-block, but the app performance is slow, and the application restarts in a moment. I have some class applications extending from the class, where the exception method is called again after the exceptions. I did not get an outoffime error in the log, and the line memory of the application of the method was not called. Is there any idea about this behavior? I'm not familiar with the application class, but if you call the app. But while adopting the method while handling exceptions, it is considered to restart your application ...? Or am I very excited? Post your code, it will be clear anyway!

html - How do browsers handle tag that specifies the character-encoding? -

Suppose that & lt; Meta & gt; Face tag that specifies character encoding: & lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> Does this start by re-purging the page, because & lt; Head & gt; The prefix characters of the section can be interpreted incorrectly? Or are there some other obstacles that prevent the first characters from being misinterpreted? As far as I know, & lt; Head & gt; After getting the Pigment announcement in the browser, the browsers are used to return and they consider ASCII compatible charsets until that point. Unfortunately I can not find any reference to confirm this. The browser's confirmation will ignore the content-type meta element, if the server already provides the content-type HTTP header, so you can type " The point for the character is for HTML documents, which is not a server by and meta> . HTTP. This means that You should not rel...

c# - WPF outlook integration gives me operation failed -

I'm not a little'm writing Dblupif applications that Outlook users through the C # approach the top 50 email (just email Other items will be read) integration. To make my application UI responsive, I am setting up a MAPI connection and reading Inbox folder from a background worker. Everything is fine, but for some users I get random exceptions. WPFapplication.WPFOutlookView._getEmailsBackgroundWorker_DoWork on WPFapplication.WPFOutlookView.OutlookMailItem..ctor (MailItem items) on MicrosoftkOfficekInteropkOutlookk_MailItemkget_SenderName () on the operation failed (object sender, DoWorkEventArgs e) This exception is very irregular and I am unable to reproduce it on my development machine. Can I use the background worker to set up the connectivity connectivity with a WPF app? (Because some online posts pointing to all Olokyum Oom calls, which should be in Olog main thread. It is also true that we are writing Outlook addin?) If it is How can I make my applicatio...

java - Issue rendering JPQL custom query results into a JSF page -

मेरे पास निम्न नामित क्वेरी वाली इकाई है: @NamedQuery (name = " findAllGarbage ", क्वेरी =" g.filename, g.description का चयन करें, कचरा जी से g.uploadDate; ") समस्या यह है कि मैं रेंडर करने के लिए एक DataTable है कि परिणाम पास करना चाहते हैं , और मैं NumberFormatException प्राप्त करता है मुझे समझ में नहीं आता कि क्यों कोई भी संख्या कहीं भी नहीं है। इस तरह से बाकी कार्यक्रम कैसा दिखता है: - ईजेबी जो क्वेरी को निष्पादित करता है @Stateless (नाम = "ईजब्स / सर्च ईजेबी") सार्वजनिक वर्ग खोज ईजेबी ने ISearchEJB लागू किया है {@ प्रेसिजन कॉन्टैक्ट प्राइवेट एंटीटीमैनेजर; सार्वजनिक सूची & lt; कूड़ा & gt; FindAllGarbage () {क्वेरी क्वेरी = em.createNamedQuery ("findAllGarbage"); सूची के & lt; कचरा & gt; TmpGarbage = query.getResultList (); वापसी टीएमपी गारबेज; } - तालिका का पता चलता है JSF का हिस्सा: & lt; p: dataTable var = "garbage" value = "# {resultsController allGarbage} "में paginator =...

cocoa touch - iphone app migrate to ipad -

I just read application guidelines "iPhone app on iPhone without resolution at iPhone resolution and 2x iPhone 3G resolution Should also move. " But my game can run on iPhone 3G, 3G, 4G. It can also run on the iPad, but the coordination is different and I do not provide a large phantom image will it be dismissed? I do not think it's time to change my code before summer vacation Do you say Does it run fine on the iPad? Is it playable? If so, I think you will be fine, but you know that this is all on Apple. I have not seen your game playing on the iPad so it is really hard to give you a reliable answer.

api - Trying to obtain error codes from a .NET executable I run from VB6 -

I execute a .NET console app from ViB 6 using ShellExecute API call: ExitCode = ShellExecute (Me.hWnd, "Open", GetAppPath & "\ SQL Utilities \" and "DocXferClient.exe", strFlags, vbNull, SW_HIDE) In the .NET App (DocXFerClient), I send an attempt to return an "error code" using the environment. Excerod: sub-main () build connection object () process (environment) .exitcode = 55 end all However, whatever error code I try to return (In this case "55"), ExitCode always "42." within VB6. Am I doing something wrong in VB6 side, .NET side or both? ShellExecute does not return any exit code This success ( 32 more value) or a failure ( 32 or less) Mandatory Raymond Chen Link: > To obtain the exit code, use. To handle the process, run your app together, do not ShellExecute . Do not forget both calling process and thread handles this return.

file upload - PHP GD Image Cropping Function -

Text after " . $ file = I use this piece of code to create thumbnails of an uploaded image = RandString (). '. Jpg '; $ UNIPELE = 'I / U'. $ Login; $ Full path = $ UniPath '/ A /' $ File; $ ThumbPath = $ uniPath '/ B /' $ File; If (copy ($ _ FILES [ 'file'] [ 'tmp_name'], $ completePath)) {function convertPic ($ w_dst, $ h_dst, $ n_img) {$ wxh = $ w_dst.'x '$ h_dst. Switch ($ wxh) {case '150x150': $ letters = 'b'; break; Case '50x50': $ letters = 'c'; break; Default: $ letters = 'z'; } $ DbPath = '/i/u1/'.$letter.' '' '.nn_img; $ New_img = $ _SERVER ['DOCUMENT_ROOT']. $ DbPath; $ File_src = "img.jpg"; // Temporary Secure Image Storage $ img_src = $ file_src; ($ File_src) Unlink; Move_uploaded_file ($ _ files ['filename'] ['tmp_name'], $ file_src); List ($ w_src, $ h_src, $ type) = getimagesize ($ file_src); // Create a new ...

symfony1 - symfony admin filter with join -

मेरे पास एक मेज है, शीर्षक , जिसमें एक import_profile_id है। import_profile में एक bank_id है। मेरे व्यवस्थापक में मेरे शीर्षकों की सूची पृष्ठ पर, मैं bank_id द्वारा फ़िल्टर करने की क्षमता जोड़ना चाहता हूं । हालांकि, क्योंकि शीर्षक के पास बैंक_आईडी नहीं है - इसे पाने के लिए import_profile के माध्यम से जाने की जरूरत है - मैं सिर्फ एक बैंक_आईडी फ़ील्ड और यह काम करने की अपेक्षा करता है। क्या कोई यह समझा सकता है कि यह कैसे करना है? निकटतम बात मैंने पाया है लेकिन मुझे नहीं लगता कि यह वास्तव में मेरी समस्या को हल करता है। यह वर्चुअल कॉलम का उपयोग करके किया जा सकता है, जैसे आपको मिली पोस्ट। वर्चुअल कॉलम सिम्फनी द्वारा प्रदान किए गए ऑटोगनरेटेड फ़िल्टर का उपयोग करके फ़िल्टर करने के लिए एक नया मानदंड जोड़ने का एक तरीका है। यह इस तरह काम करता है: 1 - व्यवस्थापक मॉड्यूल के जनरेटर.आईएमएल पर जाएं और वर्चुअल कॉलम का नाम जोड़ दें जो कि बना और जोड़ देगा & lt ;! - ऐप्स / बैकएंड / मॉड्यूल / मॉड्यूल_नाव / कॉन्फ़िग / जनरेटर.इमिल - & gt; फ़िल्टर करें: [virtual_col...

python - Twisted + qtreactor: How to cleanup after last window closed? -

I have a twisted / PATIP application (except for other things) connecting to a group of remote resources when the user closes the window so I want to close all the connections, if not possible, forcibly. The problem is that unless I close the connection, it seems that the reactor is not going to be alive anymore for me to do this. Here is my app code: # Create apps and connect twisted / Qt reactors app Q Qplication (sys.argv) qtreactor .qt4reactor.install () #Shutdown Turn off when the window closes @ defer.inline callback def stop (): Print "=" * 40, "Closing connection ..." yield off () Print "=" * 40 "Off." Print "=" * 40, "Stop Reactor ..." Reactor.stop () Print "=" * 40, "Paused." APC Connect (App, Signal ("Last Window Blocked"), Stop) Reactor. Rune Retron (RC) = APEXAC_ () Exit (RC) And here's a down Version is for connection connection: Printed "connection is closing #% s...

C# VB.NET: How to make a jagged string array a public property -

What I have to do is: Public Property Tabs Collection () Return the string () () () () Return the _tabsCollection End Get Set (ByVal value) () as the string () ()) _tabsCollection = value End Set End Property But the errors saying this: the end of the statement is expected. tabs collection () () _tabsCollection = value end set end property

iphone - AdWhirl Implementation error -

I have a blank encoded document and TRAI is to implement AdWhirl, when I rebel it, I have These are errors. undefined symbols: "_SCNetworkReachabilityScheduleWithRunLoop", refers to: - [AWNetworkReachabilityWrapper scheduleInCurrentRunLoop] refers to, "_SCNetworkReachabilityUnscheduleFromRunLoop" in AWNetworkReachabilityWrapper.o: - the [AWNetworkReachabilityWrapper unscheduleFromCurrentRunLoop] AWNetworkReachabilityWrapper.o "_SCNetworkReachabilityCreateWithName", Referenced: - [AWNetworkReachabilityWrapper initWithHostname: callbackDelegate:] AWNetworkReachabilityWrapper.o "_SCNetworkReachabilitySetCallback", referenced from: - [AWNetworkReachabilityWrapper initWithHostname: callbackDelegate: AWNetworkReachabilityWrapper.o ld: Symbol (s) not found collect2: ld 1 exit status > mConfiguration.framework . Add it, and check that you also have other necessary frameworks. From: Add the required system framework to supported ad ne...

indexing - Lucene creating duplicate indexes -

Image
I created an app using Lusen The server threw out the memory errors because I searched for one in every app Was an index holder. The garbage collector could not keep up. I have implemented a singleton approach and now many indexes are being made. Why a clue is this Used to be? Index Referrer is what I keep steady. I have received the index from this. You do not have multiple indexes, you have a lot of sections, the index in the segment with Lucene over time Splits, however, if you want you can compact it. See more for more information

javascript - Array and if statements -

अगर ([]) {} / true if ([] == true) {} // false अगर ([1] == सच) {} अगर सही ([2] == सच) {} / अगर गलत ([1,2] == सच) {} / / यदि गलत (('हाय' ] == सच) {} // गलत अगर ([[aaa: 1}] == सच) {} / [] सरणी है । सरणी वस्तु है वस्तु सच है, इसलिए [] सच है यह ठीक है। लेकिन मैं अन्य परिणाम नहीं समझ सकता। अगर ([]) {} सभी जावास्क्रिप्ट ऑब्जेक्ट्स सत्य हैं - ये सभी बूलियन मान true । यदि एक ऑपरेंड एक ऑब्जेक्ट है, और दूसरे ऑपरेंड एक बूलियन है, तो दोनों ऑपरैंड्स संख्या मान के लिए जबरदस्ती एक खाली सरणी 0 : 0 == 1 / गलत के लिए जरूर होगी ([1] == सच) {} // सच यहाँ एक ही बात है एक आइटम के साथ एक सरणी के लिए, वह आइटम नंबर पर दबाव डालता है और उस मान की तुलना अन्य ऑपरेंड से की जाएगी: 1 == 1 // true if ([2] == true) {} // false है: 2 == 1 / अगर झंडे यदि ([1,2] == सच) {} // false अगर सरणी कई मदों, संख्या के लिए जबरन नाएन : नैन == 1 // झूठी यदि (['हाय'] == सच) {} // false स्ट्रिंग को संख्या मान को NaN : NaN == 1 // गलत यदि ([{aa...

ruby - curb + mechanize = segfault? -

I get the following output from Irback (V 0.9.5) when I need to get operated and then it stops: ex> $ irb> & Gt; 'Mechanization' is required & gt; True & gt; & Gt; Need 'curb' & gt; True & gt; & Gt; There is no problem though, when I need Libs in other commands, I get the following: $ irb> & gt; ; Need 'curb' & gt; True & gt; & Gt; 'Mechanize' is required / / OPT / local / lib / ruby ​​/ 1.8 / openssl / ssl-internal.rb: 30: [bug] Segmentation fault Ruby 1.8.7 (2011-02-18 Patchhill 334) [i686-Darwin 10] Abort netting $ The gems I am using are the most recent versions (respectively 0.7.15 and 1.0.0) for the match. For Ruby I am using 1.8.7 (as seen above). In addition, I'm unfamiliar with [bug] error message. Does it mean that I have encountered a known bug in SSL? Thank you in advance for help! I can not duplicate it on Linux or Mac OS using similar versions of MacKenz and Cu...

datetime - Subtract time in PHP -

Now I am looking for an answer for a few hours, but I can not find one. I'm writing simple script User Setting Start Time, and End Time So for example, a person is working from 8:00 to 16:00. How can I reduce this time to see how long the person is working? I was experimenting with strtotime (); But without success ... is a little good: $ A = New date time ('08: 00 '); $ B = new date time ('16: 00'); $ Interval = $ a-> Different ($ B); Rebound $ Lag- & gt; Format ("% H"); This will give you a difference in the hours.

actionscript 3 - using AS3's computeSpectrum() call on arbitrary data? -

I have some arbitrary signal data that I want to get frequency analysis. Is not this audio data? Is there any way of calling the Compute Spectrum (AS3) for this work for me? tia! Compute spectrum function sample current functional audio on which FFT display To do. So you have to convert your non-audio data to some kind of sound file and play it. Since there is no way to synchronize play and capture, you will have to loop your data several times in the sound file, so that they can play for a long time, and being fortunate enough to achieve it through a compute spectrum call. have hope. It is very suspicious that it will work and give you meaningful results.

django - Why is the size of fonts from production css different from development when using same css in browser? -

I have correct.py my setup.py so that my lighttpd server can use static files for production. The output page is called CSS correctly, but my problem is that these sizes are very different from the pages of development despite the same CSS file. When I look at the source code from the browser, it happens that the CSS source for production in the browser window looks shorter than the CSS source for the development. What could possibly be the reason for this? View source CSS does not apply. Reset Browser Zoom? + 0 or CMD + 0 (for most browsers)

objective c - How to programmatically register a custom URL scheme? -

Is it going to be possible to add / remove custom URL schemes for my app? Currently CFBundleURLSchemes is set in Property Info.plist Not according to the answer, the programmatic form of custom URL schemes You can not register with them, you must specify them in info.plist . (But using LSRegisterURL , you can do ask for launch services to reload your app's info.plist , if You change the program. But it's ugly.).

DateTime JavaScript vs C# -

Despite the many posts I have still read the magic in my code I have DB ('2011-03-30 00: 00 : 00.000 ') has the date value of the date that I recover for the asp.net/mvc page where some javascript is reading and comparing it. Magic in the following: & lt;% date time UNIX time = new date (19, 1, 1, 0, 0, 0, 0); DateTime testdate = new date time (2011,03,30,0,0,0,0,0,0,0,0,0,0); & Gt%; & Lt;% = (testDate - unixTimeOffset) Total emyliseconds% & gt; ... The last string of code gives me this value: 1301443200000 When I try to read it in JavaScript: date val myDate = new Date (1301443200000); and myDate March 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time) {} but should not be until March 30. I think this local time refers to GMT-4, but what is the solution to get it independent? any idea? Thank you. Your code is correct myDate variable holds the correct date because Tuesday March 29 2011 20:00 GMT -400 as the time of the same time Merc...

c# - How to verify my project is using Entity Framework 4.1 -

I have downloaded and installed. I have created a new project and added a new ADOnate NTI data model to it. How can I verify that it was made using EF 4.1? EF 4.1 is just the extension of EFF 4.0 so that you have both EF 4.0 (GAC to System.Data.Entity .dll) and EF 4.1 (EntityFramework.dll) from the installation directory of ET 4.1 should be used. If you have added an ADO.NET Entity Data Model, then it is only EF 4.0 because EF 4.1 should be manually added or perhaps using DBCTNET Generator T4 template. EDMX is still the EF 4.0 feature.

oop - Accessing an object created in another module using python -

How to use the object created in the second module using a python Yes, that's right, import from module module exapmle: # custom module: desired_object = any def my_func (): global desired_ object desired_ object = some object () but sure Make the desired_ object come from 'my_func Before you "should be called"

jsf 2 - How to use ExtJS FormPanel with JSF 2.0 -

I am trying to use ExtJS FormPanel with JSF 2.0 + MyFaces 2.0.4. ExtJS is a great javascript framework. But if it does not use the Page Dome then the main problem starts here. To keep JSF Beans in hand, I should be kept in Jammu and Kashmir within the handle of XHTML (or viewstate) because it is synchronized with viewstate. but EXJGES is not aware of the viewstate how can I make ExtJs aware about Winstat and synchronize everyone And I can. I want to put it in the formpanel .... objects: [{.....}} but can not be found in any way And one more thing; There can be two or more forms on the same page, if I put it into exaggerated objects [[...]] how can I manage each form. Thank you. I have used both of these frameworks in a big way, and I think you are wrong here The trees are barking. As long as you think how to add these couples to the life cycle of JSF, I think that you could write additional resources on your server that could consume the extra. Or if you are sticking w...

c# - Use X509Certificate without requiring passphrase -

Image
I have a certificate that I need to use to access the web service. The problem is that whenever I try to use the X509 certificate, it asks for a passphrase (pin). Is there a way to make passphrase available directly without popping up the same window each time? certificate obtheher Technologies uses dongles, if it is any help, the code used to get the certificate is here: X509 store store = new X509Store ("MY ", StoreLocation.CurrentUser); Store. Open (OpenFlag.read only :: OpenFlag.exeXing only); X509Certificate2Collection Archive = (X509Certificate2Collection) store.Certificates; If (collection.Count! = 0) userCert = collection [0]; // Everything is okay here And here's where I use the certificate: http webbrick rake = (HTTP webburb) WebRequest.Create (New Yuri)); Req.ClientCertificates.Add (userCert); // Add the certificate I just got // ... WebResponse ret = req.GetResponse (); // Here is the place where I ask for my passphrase = "post-text...

.net - Random garbled web page in ASP.NET -

I have a hosted server on a dedicated server ( 2008 R2 IIS7.5 ) and every so often I get a malformed web page which is similar to the people below. I is full screen is full of garbage, there is no pattern on this issue, and it happens with others too, I can go for hours, perhaps without seeing it on the site In the days of surfing. They all have .aspx pages on any site? HTTP / 1.1 200 Fine cache-control: private content-type: text / html; Charset = utf-8 Content-Encoding: gzip Vary: Accept-encoding server: Microsoft IIS / 7.5X ASPNET-version: 4.0.30319 Operated by X: ASP.NET Date: Thursday, 10 March 2011 17:48: 59 GMT Content-Length: 9874? Formula ?? I?% Amp; / M? {J? Which? T? T? $? @ ??? IG #)? * ?? EVE] F @ ???? {Edit N '???? \ FD L ?? Which ??! ??? ? ~ | ? "~ ?? 7 N? O? U ????` `p equal 9 9 TTLCC7N - snip - HTTP / 1.1 200 OK cache-control: Private content-type: text / html; charset = UTF-8 content-encoding: gizip diversified: accept-encoding server: Microsoft...