Posts

Showing posts from September, 2012

c# - Get the value of a System.Windows.Forms.Timer? -

There is a problem with the Windows Form Timer This is a very basic question, but I have looked around and I could not find the answer (maybe I'm worth a slap). I should be able to get the value of the timer, time is greater than 500 millimeters. Something like this timer.apple & gt; = 500 set the number of milliseconds to the timer's interval property, which you trigger Want to do (500 in your example) and add an event handler to the tick event.

string - How to Determine the Max and Min Values Read in From a Text File in Java -

I am doing homework for a classroom, and I'm looking for some helpful hints, not a complete solution. Actually, I want to write a Java program that reads in a text file and lists the information line by line, lists the row number, and finally, prints the maximum and minimum value and the years related to each . The text file contains year and temperature for that year. So, it lists something like "1900 50.9" I'm not meant to use an array or scanner, it's part of the assignment. I have been successful in successfully achieving the line-line related to the line with program and line counting to print each year. I was told, and used the loop at that time. Now, my only issue is accessing the text file in such a way that I can differentiate all the temperatures in any way, which is the maximum and which is the minimum, and in which year every one has come. I have not asked for help because I wanted to be able to understand it on my own but due to late penalties, th...

android - Capturing audio frames from HDMI IN port -

I have a root HiSense GoogleTV that has HDMI in and out ports. What I have to do is record 10 seconds of audio from HDMI (from set-top box) I'm new to it, so please stand with me. Is it possible to do this on a routed device? If I get decrypted in HDMI and after HDMI before I'm out via HDMI ( Due to HDCP) and is encrypted again? Regularly the audio frame on the Linux box, how should I go about it? Which component should I see? I can not get a document that describes low level architecture and details of how HDMI can deliver these signals to HDMI Out. Can you really point to the Android Framework Code, Is this routing out of getting HDMI? Basically, during the exit of HDMI, I want to understand the flow of what is happening with the audio signal. I'm not sure that my questions mean, but I hope you can give me some pointers where I should start. short answer: is not possible. The pass-through is completely different from Android through reliable...

python - Dictionary best data structure for train routes? -

Image
So I have to work in a file (notepad file) to work essentially, which has a bunch of trains and time From one stop to the other, for example it would look like this: Stop A15 Stop B12 Stop C 9 Now I need to go back and reach these stops and their time. I was thinking of reading in the file and storing it as a dictionary. My question is, what would be the best dictionary for this? Or is there any other dragon device that will prove to be more useful? Any thoughts would be appreciated! I will go against the grain - and I would say that a straight flat is not the best for it. Let's say that you have 100 stops and several pathways that are non-alphabetical and non-numeric. Think of the Paris Metro: Try now and use a straightforward python dict to calculate the time between FDR and La Four? It includes two or more different routes and multiple options. A or some form is a better structure. One duct is great for 1 to 1 mapping; Trees are better for rich details of...

c# - Windsor not resolving intercepted components -

Can anyone explain why this does not work? If you remove the interceptor from the registration of IFoo and solve it once, then you get a fu (not a Mufu faucet). But with the interceptor, Fu does not solve anymore. Why? How can I tell if it will not solve it through logging or tracing? Version: Castle .Cor: 3.2 Castle. Windows: 3.2 Using .NET 4.5 C # 5 Using Castle Dynamic Proxy; Using Castle.MicroKernel.Registration; Castle use Windsor; Using the system; Namespace Sandbox {Public Interface IFooInterceptor: IInterceptor {} Public Interface IFoo {void Print (); } Public Interface ib {iFu Mifu {receives; Set; }} Public Category Foo: IFoo {Public Zero Print () {Console.WriteLine ("Print"); }} Public Class FooInterceptor: IFooInterceptor, IInterceptor {IInvocation invocation} {Console.WriteLine ("Awesome"); Invocation.Proceed (); }} Public Class Bar: IBR {public virtual IFoo MyFoo {get; Set; }} Class program {static void key (string [] args) {IWindso...

javascript - nicEdit does not behave accordingly in Chrome -

I integrate nicEdit because it is in contrast to all other people who are hundreds of KB This problem is causing chrome. For example, the text is not saved in textile or bolded things. The problem can be seen or see the code below. Please do not provide a Hunter like responder, because it is not helping anything. I have disabled the editor for debugging purposes. You can enable it with your console through the new console (). Panel Instance ('Comment'); & lt; Div class = "rdd blog-item" & gt; & Lt; H1 & gt; & Lt; An id = "blog item-title" href = "/ b / asdfssadfadf" & gt; This IIS test & lt; / A & gt; & Lt; / H1> & Lt; Div class = "blog-date" & gt; Posted Date: 2013-03-01 & lt; / Div & gt; & Lt; Div class = "blog-message" & gt; & Lt; P & gt; Asdfasdfas & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "blog-keyword" ...

Splash screen with logo in fade in + move up -

I'm actually a newcomer of jquery ... but I'm expecting you to have an impact on my website Can help me My intention is to have a splash screen with the logo (), in order to look faded, then (2 seconds) the logo up and the rest will be visible to the website. You can use jQuery's fadeIn () Can method - After this, you will call fadeOut () or slideUp () to hide the graphic. Try this (minimum) example: & lt; Html & gt; & Lt; Top & gt; & Lt; Script src = "http://code.jquery.com/jquery-1.9.1.min.js" & gt; & Lt; / Script & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "splash" style = "display: none;" & Gt; & Lt; Img src = "http://oi49.tinypic.com/34ss55v.jpg" /> & Lt; / Div & gt; & Lt; Script & gt; // Slowly fade in the image (5 seconds) and then slide it (2 seconds). $ () Ready (function () {$ ("#pllash"). Fe...

objective c - NSManagedObject as store with continuous analysis of raw data -

This is similar to the question I asked earlier, but now when I come forward a lot, I still have the question NSManagedObject As the "proper" sub-classification of I was told last night that this is a very non-permanent property and Ivar is placed inside one. Currently I have tons of code inside the NSMANGE object, and Apple's docs do not actually address that "right". FYI: Code works, but I'm asking if there are further losses, or else it There is obvious improvement to the other way. My "object" is an increasing array of incoming data, properties / iwar which track the progress of data analysis, and processed data (output) all stored in memory because it is too large , It grows very fast, and it will not be possible to re-generate / re-analyze the fact that the NSManagedObject properties are only the original data (regularly saved, the core data is NSMUtableData Does not support), some basic properties and other two relationships Ansmanedob...

DB2 Grant add,update,delete to user -

I need to add, update and delete a user named "Trial" in a database that I am associated with What will be the syntax? I have tried: db2 grant without luck Add to database to test, update , Delete Using DB2 10 in AICE (Command Line) You must check the permissions of the type Can give a database and its objects in I think the "add" is included, but it is given on a table, the database is not the same for updates and deletions. You can allow yourself, if only you have a super authority, such as sysadm, dbadm or secadm (depending on DB version 2, and security configured). For example: Enter, update, delete the table db2inst1.emp in the DB2 grant user trial all the DML Permission on schema db2inst1 in Table emp If you want to pass all the tables, you should create a grant sentence: db2 -x + o -z commands.sql "Choose 'Insert, Update, Delete' Trim (Tabs) || '.' || Trim (TabNA) || 'User Test;' From Syscat.ta...

asp.net - Response.Write against @variable when outputting json -

एएसपी.नेट वेब पेज 2 नमूना api.cshtml फ़ाइल: यह कोड सही जेएसएस वापस करता है एक jquery $। एएक्सएक्स कॉल द्वारा मान्यता प्राप्त है: @ {var डेटा 1 = ऐपफंक्शन .परफ़ॉर्मसेक्ट (ऐपस्टेट ["यू 1select"]। टूस्ट्रिंग ()); Var jsondata = Json.Encode (डेटा 1); Response.ContentType = "आवेदन / जेसन; वर्णसेट = यूटीएफ -8"; Response.Write (jsondata); } लेकिन यह नहीं है। क्यों? @ {var डेटा 1 = ऐपफंक्शन .परफ़ॉर्मसेक्ट (ऐपस्टेट ["यू 1select"]। टूस्ट्रिंग ()); Var jsondata = Json.Encode (डेटा 1); Response.ContentType = "आवेदन / जेसन; वर्णसेट = यूटीएफ -8"; } @ Jsondata मुझे लगता है कि यह एक जेएसएन आउटपुट जारी करने के बजाय रेजर से संबंधित है - response.write (jsondata) के बजाय आपने Html.Raw (jsondata) या Html.Output (jsondata) का उपयोग किया है। ?

visual studio 2010 - C# Global variable for all forms -

I am a newbie programmer who is now developing application with Visual Studio 2010 on C # and there are many variations, therefore I'm interested in it, is it possible to use some form of global variables in all forms? Simple examples, I have 10 forms, they are all connected to the MySQL database, so it's not really smart to set the 10x database name and password when ideally I can set in one place and use everywhere I can not find the answer, for the question in Google, so maybe someone can help me here? Is this possible? Build the base class for your form, which is the form . Start the shared values ​​there, be accessible from the inheritance forms.

c++ - Comparing static field pointers at compile time -

I have a class B from class A which declares a static field, and B can declare a similar area Is the same name The following does not work: struct A {static int f; }; Structure B: A {static fit F; }; // A :: FB :: is different from F structure C: A {}; // A :: FC :: F. BOOST_STATIC_ASSERT ((& amp; A :: F! = & Amp; B :: F) is similar); BOOST_STATIC_ASSERT ((& amp; A :: F == & amp; C :: F)); Although theoretically those claims can be checked when compiling time, still the expressions can not take addresses. Is there any way to check this type of work at compile time? Try to define the definition of fixed variables within the scope of static convulsions. / P> It works fine with GCC 4.7.2: struct A {static int f; }; Structure B: A {static fit F; }; Straight C: A {}; Int a: F; Int B :: f; Static_assert (& amp; A: F! = & Amp; B :: F, 'B'); Static_assert (& amp; A :: F == & amp; C :: F, "C"); Compile with int main () {}...

javascript - OOP and jQuery: how to init a var with Deferred(); -

This is my javascript code; its goal is for education only. I am studying js, oop and jquery function app () {this.deviceReadyDeferred = new $ Idle (); This.init = function () {console.log ("run"); $ .When (this.deviceReadyDeferred) then (this.run); Document.addEventListener ("click", this.onDeviceReady, incorrect); }, // NB: onDeviceReady is a non-parametri event this.onDeviceReady = function () {console.log ("deviceReady"); This.deviceReadyDeferred.resolve (); }, This.run = function () {console.log ("main"); }} App = new app (); App.init (); When I click, I get type error : this.deviceReadyDeferred is undefined Why? I have not got '$', undefined, so jQuery is running fine. I'm running Win 7 on GE 1.9.1 FF 19.0.2 on Win 7 How to postpone a JavaScript object? How to init it and reuse it? Edit: This code is working. All the problem was in the misuse of my this I am a newbie on OP in Java. function app ()...

ruby - Refactoring conditional variable assignment -

I am working on a project. Currently I have a large conditional statement, which provides a value for variables based on some input parameters. So, I have something like that. If some condition x = some value alsf another condition x = a different value ... What's the best way to refact this ? I hope I can end up with something like this x = some value if some condition || Is there a pattern for this type of thing? x = if some condition some value elsif another condition is a different value or you can use a hash. x = dict [certain condition]

Rails - Custom Validation For Having A Single Value Once -

इसलिए मेरे पास ये दो मॉडल हैं: वर्ग टैग & lt; ActiveRecord :: बेस has_many: event_tags attr_accessible: tag_id,: टैग_प्रकार,: मूल्य अंत वर्ग EventTag & lt; ActiveRecord :: बेस is_to: tag attr_accessible: tag_id,: event_id,: क्षेत्र अंत और टैग के लिए यह तालिका: ** टैग_id ** * * टैग_type ** ** मूल्य ** 1 "मजेदार" "" बोरिंग ... "2" मज़े लेवल "" लिटिल "3" मज़े लेवल "" हेलज़ या "4" जेनेरिक "" कम जोकर की जरूरत है "5" सामान्य "" लेजर टैग "... मैं क्या करना चाहता हूं एक कस्टम सत्यापन लिखा है, जहां यह देखने की जांच करता है: प्रत्येक इवेंट_आईड में केवल t1 = EventTag.new (: टैग_id = & gt; 1 ,: event_id = & gt; 777,: क्षेत्र = & gt; 'यूएस') t1.save # सफलता t2 = EventTag.new (: टैग_id = & gt; 2,: event_id = & gt; 777,: क्षेत्र = & gt; 'यूएस') t2.save # failure # क्योंकि (event_id: 777) में पहले से ही "funLevel...

App Engine Version 1.7.6 old_dev_appserver.py Model.key().id() not returning the correct id -

I'm unable to get the new dev_appserver to work. When I roll back to old_dev_appserver , my application is having trouble getting data from datastore because model.key (). Id () does not return correct id . Nobody knows what I am doing wrong? Example: When the datestore _ah / admin can be seen in institutions and id of 5764607523034234880 but calling entitiy_instance.key (). ID () 5188146770730811000 Model.get_by_id (entity.key ()) ID ()) Returns None I Believe That this unit should be returned. 1.7.6 has changed the default ID allocation till sequential scattered, resulting in such large ID The number and the problems faced by you have to face. There is one to fix this problem. Meanwhile, my suggestion for local development is to manually set back to the ID assignment sequential, as described (specifying Automatic ID Allocation Policy)

java - Eclipse Builders: Verify Return Code? -

Image
So, our Java codebase is so complex that we can not use the incremental compilation feature of Eclipse and instead " "For this reason with the argument creation, I added a program builder to get along with the path of the trainee and a logic creation: However, if I press F11 to debug, and the build fails, the eclipse will happily Ignore it and continues to launch this program, even if I had allocated the console under the build option. Any ideas about the debug launch if the build fails? I have an idea (but which can not work) to run a custom script which creates intern build and pauses if it fails . Since no one replies, I just end: Modifying the bin / intern script to add a -eclipse_build parameter, if that is present, then read -p " Change the arguments in the builder for build -eclipse_build / Ol > It's working fine for me Hope this helps future searchers!

jQuery datepicker, dialog - scroll to a location of date picked -

Issue: scroll to a specific location in a jQuery dialog I have a date on my site Inline that shows the current calendar month. If the user clicks on any date, I am showing a list of the calendar event coming out of the feed. The code is given below: & lt; Div id = "date picture" style = "font: 80%" Trebchett MS ', non-serif;' & Gt; & Lt; / Div & gt; & Lt; Script type = "text / javascript" & gt; Var Caldet; $ ("# Datepicker") datepicker () .; $ ("# Datepicker"). (Function () {caldate = $ (this) .val (); $ ("# dialog") dialog ({bgiframe: true, maxHight: 450, width: 600, modal: true, dragable: correct, resizable : False, position: 'center', show: {effect: "fade", duration: 600}, hide: {effect: "fade", duration: 600}});}); & Lt; / Script & gt; & Lt; Div id = "dialog" title = "calendar event" & gt; DisplayFed ("Calendar E...

sql server 2008 - Polymorphic database design : does this approach have a name? -

I have a base antish (item) that has a huge type of item type (& gt; 200) with different properties. ) Will host. I want a clean, portable and fast solution and came up with an idea that Mbeya has a name which I am unaware of. It goes here: The item-unit places additional fields for the Base Class + sub-category field, but the dummy-name, the item IDID , Item number, mothertipid, int1, int2, dc1, dc 2, dc3, sr1, sr2 referenced item type-type in type and hair enity ( 1: n) is the name of: Motherless field [[itemtypeid, name, type, realfield] in the example [53, MaxPressure, The limitations are: Change the field requirements in the base class Difficult to calculate Adding a domain is difficult In real-time Only possible types of queries can be defined at one time for the same type of query Is "real-field" Bullet explained: Select items, _MaxPressure_ from those items where ItemTypeID = 10 and _MaxPressure_ & gt; 42 should translate i...

Feedback Form HTML Unexpected end of file PHP -

This php file looks correct, but the 'unexpected end of file' error is returning whether there is an error in the HTML file I have tried to put the tag inside the print, an extra white space has been removed on the PHP line, the bracket [] and the quotation marks have been added on the lines in the middle, and whenever I enter it on the php script Send data here is the html code: gt; title & gt; your feedback & lt; / title & gt; & lt; / head & gt; & lt; body & gt; & lt; php // script 3.3 Handle_form.php // This page receives data from feedback.html // it will receive: title, name, email, comment in $ _POST $ headline = $ _POST ['title']; $ name = $ _POST ['name ']; $ Email = $ _POST [' email ']; $ comments = $ _POST [' comments']; print "& lt; P & gt; Thanks, $ title $ name, for your comments. & Lt; / P & gt; "" & lt; P & gt; You said that you have this example '$ ...

QuickBooks UK Edition Change VAT Field -

I'm trying to change the VAT field in QuickBooks UK. I want to say e instead of s. I am sending this XML, however, the VAT field fails to change. Am I using the wrong area? Here's my XML: I am using SalesTaxCodeRef - Full name as E In my response, I have seen that SalesTaxCodeRef is the full name S and has been included: I have seen that it happens with any code I use, like EGS. I tried to use the ListID field, however, it had no effect. Is there a setting in the QuickBooks UK to change the VAT field? Try the new version of qbXML you are using: & Lt ;? Qbxml version = "3.0"? & Gt; That's ready for QuickBooks 2004. If you use the new version of qbXML, then it is more likely that you will have better luck than try 8.0 or higher & lt ;? Qbxml version = "8.0"? & Gt;

Yii: Unit test models without database server -

A database server (or without access to other external resources) preferred / correct way to test unit against Yii model What is it )? I have found that all the unit test documents show that you have an active database server, but it is obvious that this unit is not ideal for testing. The value for which it is, here is my configuration / test I Php and my bootstrap.php: & lt ;? Php return CMap :: mergeArray (required (dirname (__ file __). '/ Main.php'), array ('component' => array ('stability ='; array ('class' = & gt; 'System.test.CDbFixtureManager',),),))); and & lt ;? Php // If necessary, change the following path $ yiit = dirname (__ file __). '/ .. / .. / Yii-1.1.13.e9e4a0 / outline / yiit.php'; $ Config = dirname (__ File __) '/ .. / config / test.php'. Require_once ($ yiit); Need_once (dirname (__ file __) '/ WebTestCase.php'.); Yii :: createWebApplication ($ config); And when I run...

dialog - Android DialogFragment with array of strings open in middle of array? -

I am opening a dialog so that my user can choose a year from the list. AlertDialog.Bilder Builder = New AlertDialog Builder (getActivity ()); Builder.setTitle ("Select the year") .setItems (year, New DialogInterface.OnClickListener) {Click on Public Zero (DialogInterface dialogue, int) which is the index status of the selected items in the // // 'which' argument)} ; Return builder.cent (); year variable is a string [] but it can be longer than 100 objects. Is the dialog showing a particular item in the list in the initial border? For example, if the array of the year is from 1913-2013 then it always opens for the year 1913. Is it anyway to open in the middle of the list in the 1980s? Try to increase a layout with a list view in the CreativesView method of a dialog.

ruby on rails - RAILS_ENV=staging cap deploy fails on rake precompile assets -

I set a t1.micro instance on AWS. I was able to successfully run: RAILS_ENV = Scaffolding Rubber: create_staging to create a server, deploy the code, and run the app. I have made some changes to the code and want to deploy on my staging server, but when I run this command: RAILS_ENV = staging cap deployed I get the following error: * executed "CD - / MNT / Domain-Scaffolding / Releases / 20130321005928 & amp; amp; Bundle Executive Rake RAILS_ENV = Scaffolding RAILS_GROUPS = Property Property: Precompile & amp; CP - / MNT / Domain Scaffolding / Share / Assets / Manifest.yml /mnt/domain-staging/releases/20130321005928/assets_manifest.yml "Server: [" staging.domain.com "] [staging.domain.co M] execute command * [out :: staging.domain.com] / usr / local / ruby ​​/ 1.9.3-p385 / bin / ruby ​​/mnt/domain-staging/shared/bundle/ruby/1.9.1/bin/ Rake Property: precompile: nondigest RAILS_ENV = Scaffolding RAILS_GROUPS = property * [Out:: Staging.domain.com] ...

html - CSS : Trying to get to div one after another -

The first division is navbar and I am making it with the help of twitter-bootstrap . There is 90px height in it. The rest height will be taken by the second div with an image background. The first NAV bar is the code for the Diva: & lt; Div id = "firstdiv" class = "navbar navbar-inverse navbar-fixed-top" & gt; & Lt; Div class = "navbar-inner" & gt; & Lt; A class = "brand" href = ". / Index.php" & gt; Home & lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "seconddiv" class = "invitation-bg" & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Div class = "span6" & gt; Liquid 6 & lt; Div class = "line-fluid" & gt; & Lt; Div class = "span 6" & gt; Liquid 6 & lt; / Div & gt; & Lt; Div class = "span 6" & gt; Liquid 6 & lt; / Div & gt; ...

iOS device in Organizer is yellow not green -

Image
I'm having problems with an iOS device and I'm trying to get the app on which I can develop I am here. I have tried to restart all the standard, delete the profile from the phone etc. Where will the first place to begin to find out? p This means that your XCode (and SDK) version is not the same as your iPhone version, which is 6.1.3. You need to update XCode so that you have the latest SDK or restore your device to your SDK version. (I do not know how easy it is to do this because as I have not already done success with it, this error message says.)

html - css positioning difference according size -

Image
I'm making a mistake in relative & amp; Full position but I do not know how to clean it. I tried to change the widow: auto and amp; 100%, but nothing worked. At the width of%, the division collapse on the minimum reduction. Now the page is not placed in the middle of laptops (other screen resolutions). What's wrong with my code? html [full source] [1] http://jsfiddle.net/X5RDL/ css h1 {Color: #fff; Font weight: normal; } Body {margin: 0 px 10 px 10 px 10 px; Background: Repeat # C5DA99 url (images / img01.jpg); Color: # 787878; Status: Completed; Font: 15px georgia, "times new roman", times, serif; } # Headers {Width: Auto; Height: 100 pixels; Margin: 15px 05px; Padding: 0 px50px; Background: Repeat URL (Picture / IMG 02.JPG); Status: Relative; } #lollow {float: right; Width: 300px; Margin: 0; Padding: 13px; Color: #FFFFFF; } # Menu {padding: 30px 10px 0 30px; Status: Completed; } #Menu Li {Display: Inline; -mobile-radius-bunch: 12px; -webkit-bord...

java - How to execute a method outside of a thread in which a dependent parameter is in -

एक सामान्य पद्धति, अर्थात् कहना हेलो (ए) , तर्क लेता है str एक औपचारिक पैरामीटर के रूप में। नया थ्रेड (नया रननाबल) {@Override सार्वजनिक शून्य चला () {स्ट्रिंग str = "हैलो वर्ल्ड"; कहते हैं हेलो (str);}})। प्रारंभ(); मुझे इस धागा के बाहर (या अधिक महत्वपूर्ण बात, मुख्य थ्रेड के अंदर) sayHello (str) निष्पादित करने की आवश्यकता है, फिर भी स्ट्रिंग str = "हैलो विश्व "; इस नए थ्रेड के भीतर निष्पादित होना चाहिए तो, मैं इस समस्या को हल करने के बारे में कैसे जाना होगा? नया थ्रेड (नया रननाबल) {@ ओवरराइड पब्लिक वायड रन () {अंतिम स्ट्रिंग str = "हैलो वर्ल्ड"; रनऑनटैब्रेड (नया रननाबल) (सार्वजनिक शून्य रहित) {कहना हेलो (str);}});}})। प्रारंभ ();

ios - Display available Bluetooth list in UITableView -

I'm new to the development of gaming. I'm making a multiplayer game that is connected to Bluetooth. Right now, in my project, I am using the Game Kit framework to detect available Bluetooth devices. This Bluetooth Bluetooth List is appearing in the GKPeerPicker controller. But now I want to display the Bluetooth list available in a UITableView . Here's the best sample code to display the list of Bluetooth devices that are available to us; It is clearly explained.

ios - Fetching results the current day & all years? -

I have read through several posts and have tried many different things but I think it seems Works for nothing can be found as it should be simple that I am missing it! I have a detailed list of names and birthdays. Changed from Json to sqlite. I am trying to get all the results of the current day (i.e. all birthdays that happened in my database on March 20). I believe I am looking for a bill to use in my fetchedresultscontroller. Is this possible? Thank you. If birthdays are stored in the database as NSDate So I do not know an easy solution. But for birthday, maybe it makes more sense to store it as three characteristics "year", "month", "day". (NSDT is an absolute point of time, which can occur on March 19th in a part of the world and on March 19 in a different part of the world.) If you do this, then you are simple You can use int theMonth = 3; Int theDay = 20; NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "mont...

multithreading - Python - How do I notify that a thread has finished to another class? -

I am using a thread to compute timed (and refreshing content in a PyGTK window) it is a loop Inside which can change its limit. At the end of each repetition the counter increases and the data is printed. What I want to do, is to get Bang and its data in the second category at the end of each tick. Perhaps the solution is related to the socket, but so far I'm trying to avoid it, so what would be the best way to achieve it? The most common solution to pass the object between the thread is to use the module: import threading import queue import time DEIF worker (Q, N): for category (N): time.sleep (i / 10.0) queue.put ([i] * i) q = queue.Queue () Thread = Threading Thread (target = worker, args = (q, 10)) thread. Start () result = 10 while results & gt; 0: print q.get () result - = 1 To better respond, you have to post more features.

Emacs 24.3 for windows, Tramp byte-code: Couldn't find a proper `ls' command -

24.2 works well, but 24.3 rotating trump gets an error when Open Remote Linux System Files or Directories: And the file paths extend some, adding an additional "c:" in the beginning is the result that the stray can not open the command nor the file I want to open 16: 04: 51.768000 tramp-get-connection-property (7) # Process-buffer zero 16:04: 51.769000 Trump-set-file-property (8) # c: / bin File-directory-P zero 16: 04: 51.770000 Trump-gate-file-property (8) # c: / usr / bin file-directory-p undef ... 16: 04: 59.531000 tramp-sh-handle-file- Truename (5) # check / c: 16: 04: 59.532000 Trump-gate-file-property (8) # c: / c: file-attributes- integer undef ... 16: 04: 51.773000 tramp-get-connection- Property (7) # Process-name Zero 16: 04: 51.773000 tramp-get-connection-property (7) # chunksize 0 16: 04: 51.773000 Trump-Set-connection-property (7) # Last-cm-time (2080 9 28067 773000 0) 16: 04: 51.774000 Trumpp Reshn-string (10) # Examination dc: \ / usr / bin 2 ...

c++ - Poco::Net library hangs on output of Poco::Net::SocketStream -

By going to slide, I wrote nearly one program similar to their first net example. #include & lt; Iostream & gt; # Include & lt; Cstdlib & gt; # Include & lt; Poco / Net / SocketAddress.h & gt; # Include & lt; Poco / Net / StreamSocket.h & gt; # Include & lt; Poco / Net / SocketStream.h & gt; # Include & lt; Poco / StreamCopier.h> Int main (int argc, char ** argv) {Poco :: Net :: SocketAddress socket_address ("www.google.com", 80); Poco :: Net :: StreamSocket stream_socket (socket_address); Poco :: Net :: SocketStream socket_stream (stream_socket); Socket_stream & lt; & Lt; "GET / HTTP / 1.1 \ r \ n" "Host: www.google.com \ r \ n" "\ r \ n"; Socket_stream.flush (); Poké :: StreamCopier :: copyStream (socket_stream, std :: court); Return EXIT_SUCCESS; } The copystream function outputs some data, and then hangs up. How do I get the rest of the data? Instead use Poco :: Net :: Dial...

add files to solr with C# -

I have XML files that I want to index the saltter to do without doing a completely pure document Is the C # code for? Thank you You specify completely loose mapping steps you can follow and follow this to a dictionary instead of the mapped class in your index document & lt; String, Object & gt;

windows - Passing serialport data data in a buffer/variable in C++ -

I have data from a serial port with 3 sensors I sensor0, sensor 1, Sensor 2 I use this program: #include & lt; Iostream & gt; #include & lt; String & gt; # Include & lt; Sstream & gt; #include & lt; Windows.h & gt; #include "SerialClass.h" four buffers [25]; using namespace std; Int i; Int main () {Serial Osial ("COM8:"); OSerial.WriteData ("1", 1); Sleep (100); OSerial.ReadData (buffer, 25); String str = buffer; String word; String Stream Stream (ARR); While (gateline (stream, word, ',')) cout & lt; & Lt; The word & lt; & Lt; "\ N"; Sleep (10000); } And the result is: sensor sensor 1 censor 2 I want the result of the data to be a buffer / Variable then the result shows y1 = sensor0 y2 = sensor1 y3 = sensor2 How can I change the code so that the result is such that In the code snippet: int count = 1; While (Galeline (stream, word, ',')) {cout and l...

command line - Create a headless Remote Desktop connection -

I want to automate the deployment of content via RDP, RDPing the machine manually in the current setup, copy the file Once it is done on a remote machine, I can easily script the content in place of the content, but how can I install the RDP session and how to remove the remote script ? It seems that remote desktop can only be used interactive, Powerlail Remoting is.

c# - how to pass default value to date parametere in storedprocedure - Sqlserver 2008? -

यहां यह मेरी संग्रहीत कार्यविधि है: ALTER proc [dbo]। [Allrecp] @ इंटेल = 0, @ पेनमेवर्चार (20) = '', @ पद्दे varchar (20) = '', @ पैडोज़ दिनांक = '1111-1-1', @sal money = 0, @dept int = 0, @loc int = 0, @ i int = 0 के रूप में शुरू होता है अगर (@ i = 1) कर्मचारी मूल्यों (@ पेन्नम, @ पीडीएस, @ पीडोज, @ सल, @ डीप, @ लोक) 2) ईएमपीआईडी ​​= @ पेड एंड अगर (@ आई = 3) एम्प्लॉयई सेट ईनाम = @ पेनमे, डीजेईएनएपी = @ पीडीओज, सेलरी = @ सैल, डीपीटीआईडी ​​= @ डीपीटी, लोकेशन आईडी = जहां EMPID = @ peid end और मेरे सी # कोड है: निजी शून्य btndelete_Click (ऑब्जेक्ट प्रेषक, EventArgs ई) {parameteres (3); } निजी शून्य btnupdate_Click (ऑब्जेक्ट प्रेषक, EventArgs ई) {parameteres (2); } निजी शून्य BTNINSERT_ क्लिक करें (ऑब्जेक्ट प्रेषक, EventArgs ई) {parameteres (1); } सार्वजनिक शून्य पैरामीटर्स (आईआईटी) (सीएमडी = नया एसक्यूएल कॉमांड); Cmd.Connection = con; Cmd.CommandText = "allrecp"; Cmd.CommandType = CommandType.StoredProcedure; Cmd.Parameters.Add (नया SqlParam...

database design - MySQL architecture optimization - MySQL cluster -

I am working on a web application with the following structure: We have "customers" and each of these Near the self is "those". Each customer (with their users and other data) gets completely separated from others and there is no shared data between them. Apart from this, each 'Customer' has a separate sub-website and all queries coming from there (by or by its users) will always refer to the same customer. The database is created in the following way: create tab 'customer' (`id` int (11) unsigned null integration) = engine; Tab 'User' (`ID` entry (11) Non-signed faucet AUTACACArtment, 'CustomerID' (11 unsigned) Create Engine = INODB; Tablet 'BlogPost' (`ID` int (11) signed faucet AUTONCRR,` User ID` encrypted (11) unsigned) Engine = InDebbi; I have several tables like 'Tablepost' which are connected to the customer from the customer. A common query will be of this type: 'blogpost' from the SEL...

linux device driver - How to test a pressure sensor on Android? -

I have seen the app, but how can I test pressure sensor driver on Android? Depending on the solution of your sensor, you see changes based on the height of the meter above the sea level Try to put it on your desk and floor, you should show small changes (or go some floor up in your building). My experience with the pressure sensor is that, it is quite wrong to measure the height in the small resolutions of the gadget. To read the values ​​of your sensor, you can try to read the original from sysfs, if you have shell access.

vb.net - adapter = nothing error return upon adding records to sql database using datagrid and parameters -

त्रुटि को ब्रेकपॉइंट --- & gt; एडैप्टर.इन्सरेट कॉमांड = न्यू एसक्यूएल कॉमांड (स्क्लिससैनैक्स, एसकेसीएल) में यहां लौटा दिया गया यह एडेप्टर = कुछ भी नहीं कहता एसक्यूएल डेटा एडेप्टर काम करने के तरीके के बारे में कोई सुझाव? मंद स्क्लसीटैक्स के रूप में स्ट्रिंग दीम परिणाम स्ट्रिंग के रूप में sqlsyntax = "tblOfficeEpublicProfile में शामिल करें (OE_ID, OE_Category, OE_SubCategory, OE_Name, OE_User, OE_Brand, OE_Model, OE_Specs, OE_SerialNo, OE_PropertyNo, OE_Static_IP, OE_Vendor, OE_PurchaseDate, OE_WarrantyInclusive साल, OE_WarrantyStatus, OE_Status, OE_Dept_Code, OE_Location_Code, OE_Remarks) "_ & amp; "मूल्यों (@ OE_ID, @ OE_Category, @ OE_SubCategory, @ OE_Name, @ OE_User, @ OE_Brand, @ OE_Model, @ OE_Specs, @ OE_SerialNo, @ OE_PropertyNo, @ OE_Static_IP, @ OE_Vendor, @ OE_PurchaseDate, @ OE_WarrantyInclusiveYear, @ OE_WarrantyStatus, @ OE_Status , @ ओ.आई.डीप्टक्लोड, @ ओ.ओ.एल.ओ.स्थानकोड, ओ ओ आररमार्क्स) "एडीएडएडएक्टर एसक्यूएलएडेटा एडाप्टर के रूप में।...

override - How does equals() method work in Java -

इस सवाल का पहले से ही एक उत्तर है: 20 उत्तरों बराबर पद्धति यह दर्शाती है कि क्या दो वस्तु मान समान हैं या नहीं। मेरा प्रश्न यह है कि यह कैसे दो वस्तुओं की तुलना करता है? यह कैसे बता सकता है कि दो वस्तुओं समान हैं या नहीं? मैं यह जानना चाहता हूं कि यह दो वस्तुओं की तुलना क्या करता है। मैं हैशोड विधि को शामिल नहीं कर रहा हूं। डिफ़ॉल्ट कार्यान्वयन, एक वर्ग के java.lang.Object , बस संदर्भों का परीक्षण एक ही वस्तु के हैं: 150 सार्वजनिक बुलियन बराबर (वस्तु obj) {151 वापसी (यह = = Obj); 152} संदर्भ समानता संचालक को इस तरह वर्णित किया गया है: चलने के समय, == का परिणाम सही है यदि ऑपरेंड मूल्य हैं दोनों नल या दोनों एक ही वस्तु या सरणी को देखें; अन्यथा, परिणाम झूठा है। यह डिफ़ॉल्ट व्यवहार आमतौर पर अर्थात् संतोषजनक नहीं है। उदाहरण के लिए आप == : पूर्णांक एक = नया पूर्णांक (1000) का उपयोग कर बड़े पूर्णांक उदाहरणों की समानता का परीक्षण नहीं कर सकते; पूर्णांक बी = नया पूर्णांक (1000); Println (एक == ख); यही कारण है कि विधि ओवरराइड हो गई है: 722 पब्लिक बूल...

How to deploy an ASP.Net Web Forms on Apache with mono mod -

I have applied an ASP.NET web form and it is working in Debug Mode in Visual Studio 2012. But when I uploaded an application in my Apache folder with mod_mono I got an error which indicates that I have this web Should do this in the config: & lt; Configuration & gt; & Lt; System.web & gt; & Lt; CustomArser's mode = "off" /> & Lt; /system.web> & Lt; / Configuration & gt; My question is now, how should I set up my application to release from debug? When I clicked on the application, he gave me a small message in the console. When I use the deployment application option, I find a menu with some server settings that I can not understand and I do not know. Edit Now I found this error message: Parser Error Details : Error parsing the resources needed to serve this request Parser error message: File '~ / Site1.Master' does not exist Source error: P> Line 1: & lt ;% @ Page title = "" language =...

user - How to make admin that can't delete products in Magento? -

As the title says, I am not ready to make administrators who can not delete the product but add that product Can update Mage_Adminhtml_Block_Catalog_Product_Edit overwrite and create a custom module with ACL then create a custom role and assign it to these users See /app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php Protected Functions _prepareLayout () {..... If ($ this-> getProduct () - & gt; Haydel Qualified () & amp; amp; ltd; ACL & gt;) {$ this- & gt; Set Chalk ('delete_button', $ this- & gt; getLayout () - & gt; createBlock ('adminhtml / widget_button') - & gt; setdata (array ('label' = & gt; mega :: helper ('catalog ') -> __ (' Delete '),' onclick '= & Gt; confirmSetLocation (\'. Mage :: helper ('catalog') - & gt; __ ('Are you sure?'). '\', \ '. $ Get-> getDeleteUrl ()' \ ')', 'Class' = & gt; 'Delete...

linux - php impersonate user -

I'm trying to do is shell commands from the system web page as root is run . I've done the research, there is no way to impersonate a system user to PHP in terms of his (Santos 6.3 to be exact) with PHP 5.4.13. So far I sudo is set and the line Apache ALL = (ALL): NOPASSWD for all (test) / Etc / sudoers to . I then created a simple php file in the root of your website: and nothing happens, though, if I'm running: & lt; Php shell_exec ('whoami'); ? & Gt; I get the apache as a result, so I know that at least shell_exec is working. If I cli Su apache , I found this account is not currently available. I believe because Apache has a Knowledge Defined (?) Apache: x: 48: 48: Apache: / var / Www: / sbin / nologin So what commands have to be able to run from php as root? By running the example of what I am trying to get as root, I want to add the certificate to the / etc / ssl / certificate / https the following command line ...

canvas - draw line between two cordinates in ondraw() in android -

I have two points, say (x1, y1) and (x2, y2). Now I have to draw a line between these points using the OnDraw () method. mPaint.setColor (Color.BLACK); Path.moveTo (x1, y1); Path.lineTo (x2, y2); Canvas navepath (route, MP); text "itemprop =" text "> try this kind of canvas.drawline (p1.x, p1.y, p2.x, p2.y, paint);

android ndk - Disable all warning during ndk-build -

I try to disable all warnings during the 'ndk-build' process to compile CPP code with JNI Any thoughts? Thanks I am not using LOCAL_CFLAGS: = -Wno-error . Thanks OK. Understood. Place this line in your Android.mk file. LOCAL_CFLAGS: = -w Hope this helps

Passing text from Javascript->HTML->PHP -

मेरे पास इस तरह एक जेएस चर है totalItems = 'TOTAL ITEMS'; If (rck & gt; 0) totalItems = totalItems + "\ n रैक (s)" + rck; यदि (totflat & gt; 0) कुल आइटम = कुल आइटम + "\ n फ़्लैट शेल्फ (s)" + totflat; यदि (डीबी & gt; 0) कुल आइटम्स = कुल आइटम्स + "\ n प्रदर्शन बार (ओं)" + डीबी; यदि (totslan & gt; 0) totalItems = totalItems + "\ n निलंबित शेल्फ (एस)" ​​+ totslan; Document.getElementById ('कुल मिलाकर')। InnerHTML = कुल आइटम; यहां कुल मिलाकर मेरा & lt; div & gt; आईडी HTML फॉर्म में है। पाठ एक पंक्ति में छपाई कर रहा है, लेकिन मैं उन्हें प्रत्येक पंक्ति में चाहता हूं जैसे TOTALITEMS रैक 2 फ्लैट शेल्फ (एस) 2 ... यह कैसे करें? और मेरे दूसरे प्रश्न को मुझे उसी पाठ में अपने PHP फ़ाइल में भेजने की आवश्यकता है I कैसे पाठ को div से PHP पर पोस्ट करना है? कोई सलाह ??? & lt; br & gt; के बजाय का उपयोग करें । और उन्हें एक PHP स्क्रिप्ट में गुजारने के लिए आपके पास कई तरीके हैं पहले आप उन्हें J...

jquery - FIle upload control onchange call javascript function but not access file in IE7, IE8,IE9? -

HTML कोड इनपुट प्रकार = "फ़ाइल" id = "fileuplaod" onchange = "readURL ();" / & gt; जावास्क्रिप्ट & lt; script type = "text / javascript" & gt; फ़ंक्शन readURL () {var myFileList = document.getElementById ("लोडफ़ाइल"); चेतावनी (myFileList.files.length); // फाइल के माध्यम से लूप, संपत्ति के माध्यम से (var i = 0; i & lt; myFileList.files.length; i ++) के लिए चुने गए फ़ाइलों की संख्या प्राप्त करने के लिए लंबाई का उपयोग करके, {// उन्हें डिव अलर्ट ("रन") में प्रदर्शित करें; Document.getElementById ("प्रदर्शन")। InnerHTML + "" & lt; br / & gt; " + MyFileList.files [i] .name; }} & Lt; / script & gt; सभी ब्राउज़र चलाने पर आईई 7, आईई 8, आईई 9 में नहीं यह आपकी मदद कर सकता है आईई कॉल ऑनchange (); फ़ंक्शन fireEvent (तत्व, घटना) पर निम्नलिखित कार्य ठीक काम करता है {if (document.createEventObject) {// IE var evt = document.createEventObject () के लिए प्रेषण; व...

c++ - Do libraries usually come with header files? -

I am currently being useful for time, again making a small library of reusable codes and I am wondering how libraries are usually deployed? I was under the impression that Dll and .lib will suffice, but then, how do I reference classes and tasks? Does it come with lots of .h files for the library or is there a more elegant solution? What is the use of real-world deployment that uses the library? Once linked to the link, then me too. Need to send the Dll file or the content of the library is copied to the program? As a rule of thumb, you collect all your public ways, Wants to end users in a group named header. At this point, you should distinguish between the internal header and the API header and you will see that your header file number (API header) will decrease and the management of the file structure will be very easy.

knockout.js - Custom binding valueAccessor has unexpected result -

मैं knockout.js के कस्टम बाइंडिंग में निम्न व्यवहार द्वारा stumped हूँ: Ko.bindingHandlers.customBinding = {update: function (element, valueAccessor, allBindingsAccessor) {var मान = ko.utils.unwrapObservable (valueAccessor ()); Console.log (JSON.stringify (मान)); }} Ko.applyBindings ({someText: ko.observable ("inital value")}); और & lt; इनपुट प्रकार = "टेक्स्ट" डेटा-बाइंड = "मान: कुछ पाठ, कस्टम बाइंडिंग: {कुछ: 'विकल्प'}" & gt ; valueAccessor () चाहिए मुझे दृष्टिकोण मॉडल संपत्ति दें जो कि तत्व के मूल्य से जुड़ी है (अर्थात् अवलोकन someText )। डॉक्स उद्धृत करने के लिए: valueAccessor â ???? एक जावास्क्रिप्ट समारोह है कि आप इस बाध्यकारी में शामिल मौजूदा मॉडल संपत्ति प्राप्त करने के लिए कॉल कर सकते हैं। हालांकि, यह वास्तव में / Div> आपको अपने कस्टमबैंडिंग कॉल में अपने मूल्य के लिए इच्छित मॉडल प्रॉपर्टी को पास करना होगा। आपके मामले में, आप मॉडल संपत्ति 'कुछ पाठ' चाहते हैं: & lt; इनप...

asp.net mvc - tinyMCE is not defined -

Image
I am using TinyMCE in ASP.NET MVC 3 but I think this is not a problem. Error: jquery-1.9.0.min.js: 3 inauspicious reference error: tinyMCE is not defined localhost: 67678 / scripts / jquery- 1.9 0.min.js & lt ;! - TinyMCE - & gt; & Lt; Script type = "text / javascript" src = "~ / scripts / tiny_mce / tiny_mce.js" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; TinyMCE.init ({mode: "textareas", theme: "simple"}); & Lt; / Script & gt; & Lt ;! - / TinyMCE - & gt; & Lt; H3 & gt; Example of a simple theme & lt; / H3 & gt; & Lt; P & gt; This page shows you simple topics, and its main functionality can change the code and extend it using advanced theme if you need to configure / add more buttons etc. & Lt; A href = "http://tinymce.moxiecode.com/examples/"> Wiki & lt; / A & gt; & Lt; / P & gt; & Lt ;...

c# - How to change the visible property of the text box from the view model ( WPF, MVVM) -

I am starting with WPF and MVVM. I have some control over a window in my project, for example, my There is a text box in my window near me. I am using the MVVM pattern and here I want to change the visual property of the text box with visual model. Another thing is, I want to change the visibility of the text box with the view modal based on some circumstances. Well, I forgot it and Google gave me some suggestions, which were all different solutions and I 'm in total confusion can anyone help me understand this is. I know that this WPF will be a piece of cake for MVVM experts, but since I am trying to learn this material, then I need some code as an example. Thanks Since it is MVVM, you change the visibility of the textbox Do not want to actually disable want some options again .. - Whether that option is enabled or disabled, your textbox's visibility should be reflected on. So basically you want a property in ViewModel like: Public Bull Canopyrope...

c# - Add Image in a stackpanel based on textbox input -

I am trying to store the image in a stapple panel .. \ resources \ ebi.png Most of the time, the textbox input Based on "Atracount", the same image will be displayed in the StackPanel below, the sample code has been attempted, but it is getting an error saying "The specified view is already visible to any other view Has a child or is the origin of a composition goal " is the code below The Oshis: private bitmap image bmp = new Bitmap image (new Uri ( "WpfApplication1; components / resources / ebi.png", Urikind. Riletiv Orsolut)); Private Zero EtReqCount_TextChanged (Object Sender, TextChangedEventArgs E) {StackPanel dynamicStackPanel = new StackPanel (); DynamicStackPanel.Width = 300; DynamicStackPanel.Height = 200; DynamicStackPanel.Background = New SolidColorBrush (Color. LightBu); DynamicStackPanel.Orientation = Orientation. Vertical; If (Attarcount.Text! = "") {For (int k = 1; k & lt; = int32.Parse (etReqCount.Text); k ++) {I...

java - Mobicent EJB Injection in a sip servlet/ rest service project -

Issue: The use of reest service and SIP service in a project is for exception, if EJB is also used in injection is. Adding a SIP service and REES service in the project (REST service is activated through a class extension and has been annotated with the application @ ApplicationPath , which is not a Java EE6 "no XML" approach, activating JX-RS) Using the REST service and / or the SIP servicelet Add an injected service to the project by AJB. Error: Error: send exception listener class org.jboss.weld.servlet.WeldListener deleted lifecycle event request example: Java.lang.NullPointerException at org.jboss.weld.context.AbstractBoundContext.deactivate (Absbband Kntentektkjawaः 71) [weld core-Lklk8kfnlkjr: 2012-04-29 10:45] org.jboss.weld.context.http.HttpRequestContextImpl.deactivate (HttpRequestContextImpl.java:86) [weld core -1.1.8. Final. On jar: 2012-04-29 10:45] On the organization. Jboss.weld.servlet.WeldListener.requestDestroyed (WeldListener.jav...

C# Image Resizer with Canvas Handler -

I am incredibly new to C # (has just started today) to be able to 500 x your side 500 image for a C # image resizer example with a canvas handler is required to maintain the ration will be converted to 1024x500 will it 500x500 to do but white space (canvas ) With fill the rest of space. I will also be resizing the size of the same original image for 300 x 500, where the image will be able to resume its 1:. 1 ration and turned 300x300 and remaining space from the canvas used as white space Can anyone help me to build a C # console application that I can understand Here I have found that I can reasonably understand (due to good comment). What I got with the code is that I can read it, but when it actually writes for me something I just fall apart, I primarily do HTML and CSS. Start entering JQuery and C # Using the system; Using System.Collections.Generic; Using System.Linq; Using System.Text; System usage threading. Task; Using System.Drawing; Using System.Drawing.Imagi...