Posts

Showing posts from July, 2013

hibernate - HQL and one-to-many queries -

I have hibernate domain objects that look like this: class player {list & Gt; Items & gt; ; List; } Category item {list & lt; Attraction & gt; Sorcery; } Class exchanges {Boolean supplementary enchantment; } I need to create a HQL query that gives me a list of all the players who have at least one item on which there is a charm in which IsuperiorEnchantment is the flag set I can not understand a way of expressing it in HQL for my life. Any thoughts? Considering the appropriate mapping on all of the above, the query you are looking for is:

iphone - MKMapView questions -

I am working with the MKMapView control (SDK v3.0) in the simulator for a few days. I'm able to map an arbitrary place, zoom it, drop a pin, and add an annotation. I'm still a bit fuzzy on the full capabilities of the MKMapView control (outside the simulator), though. If the 'shows the user location' property of the Mkmap scenario is checked, the iPhone Simulator is a pin at Apple's headquarters, obviously the simulator is not really geocoding the actual location of the phone. Does this functionality mean, however, is 'one' example of CLLocationManager in Mkmap scenario? Another way is, does the Mkmapview, when 'Show user location' option is selected, to locate the phone's location and drop the pin? If so, does this without giving permission to get this place? Can I set the default zoom level in IB? Thank you for your time, Craig Buchanan Here's an example of zooming programmatically (there is no way IB to do this): MKCoor...

KML and delete old KMLs files -

Can I delete temporary locations in Google Earth before adding a new location mark using a kmili file? I do not think there is any way to delete before adding a new file, but you can create a network link Can set up which indicates the file and then the set refresh interval or setting ends.

xml serialization - How can i change the XmlElement attribute OUTSIDE the class? -

I have a class property that is generated in a suitable manner with its appropriate XmlElement attribute. I am the successor of this class and expose it as a parameter on a webservice, for which a WSDL is automatically generated magically. I have been told that the XML attribution feature of the property needs to be changed from its place, and how can I make this new feature out of the outline generated by WSDL? Ie: either in the inherited class, or in the structure of the partial class? You must obtain another class, and implement IXmlSerializable . The good news is that you should be able to get XML serializer for all or most of your work. In the Readxml method, you will call deserillise, you will serialize in the written XML method. You'll use different elements to specify names. I'm not 100% sure that this will be enough to replace the automatically generated WSDL.

c# - How to tell if an IEnumerable<T> is subject to deferred execution ? -

I always believed that if I was selecting (x => ... ) The context of LINQ for the objects, then the new collection will be created immediately and will remain stable. I am not sure why I assumed it, and this is a very bad assumption, but I did it. I often .toList () not anywhere else but not in this case. This code indicates that a simple 'selection' is subject to deferred execution: var random = new random (); Var animal = new [] {"cat", "dog", "mouse"}; Var randomNumberOfAnimals = animals.Select (x => Math.floor (random.NextDouble (* 100) + "+ + + +" + "S"); Foreign currency (in the form of random number of pomegranate) {testContextInstance.WriteLine ("there are" + I); } Foreach (I am numbered atoms in random) {testContextInstance.WriteLine ("and now, there are" + i); } This gives the following output (random function every time the archive repeats): There are 75 cats, 28 dogs are 6...

web services - compact-framework cannot establish connection to network error -

I'm trying to use Pocket PC emulator (vs. 2008) to connect to the web service on my standby. No matter what I try I can not connect. I am using the IP address of my laptop in the URL. This works very well with the URL on my laptop, I can not get the emulator to hit it and I have the exception to "Can not establish a network connection". As long as my eyes do not pop in my skull, no other answer can be found. Thank you in advance Two you have the Is ping? Maybe tracert ? If you have a network problem, you must diagnose the network. For example, if you have ping for your laptop or even telnet , you have a more basic network problem and there is no problem with web service.

database - Convert Access queries to SQL Server views when using DTS -

I am using DTS to import data from an Access database in STM Server 2005. It seems that DTS accesses queries as an import table, rather than ideas, which will not work for me, is there any way around it? You can choose not to include saved queries (at least when you use SSMA I suggest you use it instead of DTS anyway ... it works to do a better job). You can find it here: It is not clear whether you will continue using MS-Access as a front end or not? If you are planning on using access, you do not actually need to convert those saved query (views) to SQL Server. Most of the saved questions in access will work in the form of a previously (now linked tables with SQL Server). You only need to change / decide the saved stars that move at slow speed. In other words, most questions can be used and it needs to be run. It is only slow and especially with the total work (amount, sum, etc., which produce many records, but produce some rows). Such questions are actually being take...

c# - What is the collection equivalent of a multi-dimensional array? -

I have a set of data that looks like this: 001 001 forest 001 002 two 001 003 three 002 001 one 002 002 two 002 003 three ... Now, of course, I can create an array of string [x] [y] = z But this array needs to be resizable, and I want to use string indices of the index, as the numerical reason is that I will need to see the data through the string, and I No unnecessary string-> Number conversions will not appear. My first idea was: dictionary & lt; String, dictionary & lt; String, string & gt; & Gt; Information; Data = new dictionary & lt; String, dictionary & lt; String, string & gt; & Gt; (); Dictionary & lt; String, string & gt; Subdata = Dictionary & lt; String, string & gt; (); Subdata.Add (key, string); Data.add (key2, subdata); And it works, but some cumbersome, it also feels wrong and kundi and is not particularly efficient. So what's the best way to store such data in the archive? I also had the idea ...

tsql - SQL-Copy a record with its related child records -

I want to copy the line to SQL, which has 2 other records in the child's hair. If I duplicate the master record then I want to duplicate them all. For example, if I say I want to copy the master record with ID 15 with a new record. I want all your records to be duplicated with the new Master Records ID. It can use loops and conditions through TOSQL. But I just want to know that there are better alternatives. Thank you. "itemprop =" text "> The best option is to get your master table that is the children of the same old line and insert them into the baby table. Is to use a combined trigger on I have run on a lot of rags, but something like this:. To create tr_master trigger on master, select the childtable (masterid, childvalue) insert inserted.id as inserted probe, oldchildren.childvalue inserted on oldchildren.masterid = inserted .copiedfromid childtable oldchildren Join) , is triggered by, it is not "address" which records the copied ...

svn - Subversion: How to copy the commit the log at the bottom of the pre-checked-in file -

Assume that I have a text file to use subversion. Before being committed, a pop-up window will appear, which has a file and a message box in which I can comment about related files for my file. The first question, I want to verify if it is possible to send a message, which I have put in the message box of the pop-up window at the bottom of the text file. Second, if yes, please apply. I do not really have any idea about pre-commitment. No it is not possible. See: Are there any keywords of subversion that behaves in $ log $ CVS? No $ $ $ in CVS is not equal to $ keyword if you want to retrieve a log for a specific file, then you must call 'svn log-in-file-name' You can run 'svn log url-to-your-file' some explanation from the mailing list Why is $ $ $ bad: "$ log $ is a total panic, at the time when you have branches Begin to merge the changes between you. You are practically guaranteed to struggle there, which - this search query Due to the natu...

Best methodology for File Uploading :How does Youtube? -

What is the best way to upload files to a server using my website? Each user will upload some files into their file. Can I put all the files in the same directory? Do I need to create folders and keep files for each user? How are you tube Any remedy? How do I store the information uploaded in the database? The most effective way to do this is to handle large numbers of users and files. I do not want to know about the use of APIs and all. I want to know the best approach (file organization) thanks in advance A folder will be close to each user, its more manageable! I will not imagine a huge folder with loads of files! You can eliminate duplicate file names and end the removal of another user files! I will create a directory for every user!

python - Fit algorithm does not accept my data -

I am using an algorithm that decreases the Gaussian bell on my data. If I have my data table with: x = linspace (1., 100., 100) data = 17 * exp (- (x-10) / 3) ** 2) Everything works fine. But if I read data from a text file using file = open ("d: \\ test7" .txt ") arr = [] data = [] DEAF COLUMN (MATRIX, I): Row line (in the line [i] matrix in the file]. Lineline (): number = map (float, line split)) Arr.append (number) data = Column (arr, 300) x = linspace (1., 115., 115) I get an error message: Traceback (most recent In the last call): File "readmatrix.py", line 60, Fit (F, [ M, sigma, altitude, data) file "readmatrix.py", in line 42, in fits if x is none: x = arange (y.shape [0]) attribute: error: the 'list' object is not attribute ' As I can see, the values ​​contained in the data are correct, it looks like: [0.108032, 0.86181600000000003, 1.386169, 3.2790530000000002, ...] Is there any indication that what ...

ASP.NET File uplading:Show Progress to User -

I have an asp.net page where I use the facility of uploading files for user.in asp.net Wish, we have an ASP.NET file upload control. I want to upload the site to some upload progress to the site, when it uploads the file to the site IIF. I use the ASP.NET file upload control, this post will use back and do not give the impression to the user as Youtube / orkut while uploading this file. Can anyone tell me a solution for this? I am using VS 2008 and I recommend that you Read:

php - Zend Gdata - setVisibility for newEventEntry? (specify events for multiple calendars) -

I know that you specify setVisibility ('private-abcdefg') for newEventQuery () to specify a specific calendar Can be used. My question is, can I use the same concept for the new Avent Entry ()? $ gdataCal = New Zend_Gdata_Calendar ($ client); $ NewEvent = $ gdataCal- & gt; NewEventEntry (); $ NewEvent-> SetVisibility ('Private - *****************'); I tried to get this code, but I got an error: Fatal error: a non-object member function getDOM () Call to /home/content/b/e/h/behrk2/html/ZendGdata-1.8.4PL1/library/Zend/Gdata/Kind/EventEntry.php on line 154 What Anything can do to accomplish this? Because I have more than one Google Calendar, and I want to specify which calendar should go to the event ... Thank you! You are ending it I had the same exact problem, and it is simple, but not clear , And took notice to dig me through the notice. To post to a calendar other than the default calendar, simply insert the event at the end of the eve...

c# - Split the width evenly between of two controls that make up a listbox item? -

I am trying to set up a list box so that each item has a text block and Cambodia, which is equal to the width Split up Listbox but i can not find magic combination of ColumnDefinition properties to do this. Here's my datatymeet for the list box item. I cleaned it because it was wrong, anyhow. & gt; Datamapplet X: Key = "MyDetTemplate" & gt; & Lt; Grid & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; ColumnDefinition / & gt; & Lt; ColumnDefinition / & gt; & Lt; /Grid.ColumnDefinitions> & Lt; Text block grid Column = "0" text = "{binding XPath = text ()}" /> & Lt; Combobox grid Column = "1" selected index = "0" item source = "{binding source = {static resource name}, XPath = name}" & gt; & Lt; / Combobox & gt; & Lt; / Grid & gt; & Lt; / DataTemplate & gt; I have tested a simple application with a grid on a window. By specifying just...

python - How to solve this complex recursive problem, pyramid point system -

I am trying to program pyramid like a score system for an ARG game and came up with a problem. When users come into the game, they start a new "pyramid", but if a player starts playing with a referrer code from another player, then he becomes the child of this user and then raises the ladder. . There is no point calculation here, I have acquired this right with some good help from the people, but if a user becomes more a point that he is a guardian, then he should turn the places into a ladder Should give. That's because a user becomes a parent of their parents and so on. Python code does not work right now, and I really do not know why. Def valid_perient (user): "" "This is a recursive function that checks to see if any parent should collide because their parents Get more points. " "Get_score" import from Rottenetter.accounts.models try get_score: excluding parent = user.parent: return incorrect: # if this player is more than its par...

c# - JQuery Flexigrid plug-in in ASP.Net -

I have an ASP.NET project with C # and ASPX page has a repeater control that creates an HTML table Walking on the Data Source I want to use the JQuery Flexigrid plug-in to scroll the table, but due to the lack of documentation on the plug-in it is unable to know how it works. Know how to do this, or share it Is the sample code for the field? I've never used Felsilgrid though after viewing the samples on the site, I made my suggestions I will offer. It looks like what you need to do with your repeater, properly formatted HTML table has at least one hasd and tab section. & lt; Table id = "mytable" & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th & gt; Header1 & lt; / Th & gt; & Lt; Th & gt; Header2 & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td> Table data 1 & lt; / Td> & Lt; Td> Table data 2 & lt; / Td...

security - User name not found or incorrect password error message too vague -

When you make a mistake in your username or password, in many applications you get a non-specific error that indicates Gives the entered username does not exist or the password is wrong for that username. I (instinctively) hope that to specify the app is one of the two errors, is there any reason to not distinguish between them? I think it will make it even more difficult for an attacker to guess the correct username / password combination, but is there any literature, research or similar that supports this notion? This will be the reason for security: it prevents the use of unsuccessful attempts. It should be balanced with the user experience; If you have been told that either your username or password is incorrect, then it can be considered very unmanageable or disturbing.

How to "stack" a Silverlight Bar Chart? -

मान लें कि मुझे यह एक्सएएमएल (बना दिया गया है): & lt; Grid Xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml" xmlns: sys = "clr-namespace: सिस्टम; विधानसभा = mscorlib" xmlns: datavis = "clr- नामस्थान: सिस्टम.विंडो। नियंत्रण .DataVisualization; विधानसभा = सिस्टम। विन्डोज़। नियंत्रण। डेटाविसाइज़ेशन। टाल्ककिट "xmlns: charting =" clr-namespace: सिस्टम। विन्डोज। नियंत्रण। डेटाविसाइजेशन। चार्टिंग; विधानसभा = सिस्टम। विन्डोज। नियंत्रण। डेटाविसाइज़ेशन। टोलकिट "xmlns: उपयोगिता = "सीएलआर-नामस्थान: उपयोगिता; विधानसभा = चार्टबिल्डर" xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" & gt; & LT; चार्टिंग: चार्ट & gt; & LT; चार्टिंग: Chart.Series & gt; & Lt; चार्टिंग: बारसिरीज शीर्षक = "श्रृंखला 1" & gt; & LT; चार्टिंग: BarSeries.ItemsSource & gt; & LT; उपयोगिता: ObservableObjectCollection & gt; & LT; sys: डबल & gt; 1 & lt; / sys: डबल & ...

c# - rewritemaps with an external config to force an application pool recycle -

मेरे पास मेरे web.config में निम्नलिखित परिभाषित हैं ( & lt; rewritemaps configSource = "Rewrites.config" / & gt; मेरे पास एक CONFIG फ़ाइल है जो किसी वेब पेज के माध्यम से एक व्यवस्थापक द्वारा पुनर्जीवित किया जा सकता है। हालांकि जब यह फाइल बदलती है, तब तक नए परिवर्तन नहीं किए जाते हैं आवेदन recycles। मेरी question है कि मैं आवेदन पूल स्वतः जब फ़ाइल बदलता है, यह संभव है? मैं मध्यस्थ ट्रस्ट के तहत चलने वाले एकीकृत मोड में IIS7 का उपयोग कर रहा हूं। धन्यवाद रिचर्ड सिर्फ एक ऐप पूल रीसाइक्लिंग का एक हैक तरीका है कि उप-फ़ोल्डर हटाएं। यह एक ऐप रीसायकल को ट्रिगर करेगा ।

java - Why is this code throwing a ClassCastException and how to avoid it -

इस कोड पर गौर करें: import java.util। *; कक्षा jm45 लागू करता है Comparator & lt; jm45 & gt; {निजी इंट एक्स; Jm45 (इंट इनपुट) {x = इनपुट; } सार्वजनिक स्थिर शून्य मुख्य (स्ट्रिंग एल्ग्स []) {सूची सूची = नया अर्रेलिस्ट (); List.add (नया jm45 (2)); List.add (नया jm45 (2)); Collections.sort (सूची); // दोषपूर्ण लाइन} सार्वजनिक इंट की तुलना करें (जेएम 45 टी 1, जेएम 45 टी 2) {रिटर्न टी 1 एक्स - टी 2 एक्स। }} अपनी श्रेणी के बजाय Comparator & lt; jm45 & gt; तुलनात्मक & lt; jm45 & gt; । ए तुलनाकर्ता जानता है कि दो वस्तुओं की तुलना कैसे करें - एक तुलनात्मक जानता है कि किसी अन्य की तुलना कैसे करें स्वयं के साथ। आपको या तो सॉर्ट () का उपयोग करने के लिए एक तुलनित्र (दूसरे तर्क के रूप में) में जाने की आवश्यकता है या मान तुलनीय होने चाहिए। P> यहां एक ऐसा संस्करण है जो इसके बजाय तुलनात्मक इंटरफ़ेस का उपयोग करता है: import java.util। *; कक्षा परीक्षण लागू करता है तुलनात्मक & lt; टेस्ट & gt; {निजी इंट एक्स; टेस्ट (इंट इनपुट) {x = इनपुट; ...

Is the syntax problematic with this PHP code for Wordpress? -

Feel like this problem is PHP syntax, but there is no luck in wordpress forums This first code block category "Posts "Makes a link for the latest post. & lt ;? Php $ my_query = new WP_Query ('category_name = post & showposts = 1'); ? & Gt; & Lt ;? While Php ($ my_query-> is_psoz ()): $ my_query-> The_post (); ? & Gt; & Lt; A href = "& lt ;? php the_permalink ()? & Gt;" Rel = "Bookmark" & gt; & Lt ;? Php the_title (); ? & Gt; & Lt; / A & gt; & Lt ;? Php timeline; ? & Gt; This next code block should display custom field data for the latest posts in "posts", with the key of the "quad" custom field. But it is not and it does not show anything. & lt ;? Php $ my_query = New WP_Query ('category_name = post & showposts = 1'); ? & Gt; & Lt ;? While Php ($ my_query-> is_psoz ()): $ my_query-> The_post (); ? & Gt; & Lt ;? Ph...

Standard meta data format for video like id3 tag for audio? -

Is there a standard meta data format for video? Are there other meta data formats that are normally applied to the video file? No, there is no "bolt-on" metadata format for video (id 3 MP3 Is a bolt-on metadata block). Most video containers (AVI, OGG, MKV, MP4) have their own metadata format.

flex - "Open" PopUpMenuButton on MouseOver? -

I have PopUpMenuButton. I want to make it so that the mouseover (either above the button or "V" part of the menu) is open Went for I do not care about clicking the button I tried to do a My_PopUpMenuButton.dispatchEvent (New MenuEvent.ITEM_CLICK) , when another button was clicked, T work. Any thoughts? Thanks! Have you tried to call the open () method of control directly on mouseover, like? & lt; Mx: popup menu button id = "myButton" mouseOver = "myButton.open ()" label = "hover over me" & gt; & Lt; Mx: dataProvider & gt; & Lt; Mx: array & gt; & Lt; Mx: string & gt; Item A & lt; / Mx: string & gt; & Lt; Mx: string & gt; Item two & lt; / Mx: string & gt; & Lt; Mx: string & gt; Item three & lt; / Mx: string & gt; & Lt; / Mx: array & gt; & Lt; / Mx: dataProvider & gt; & Lt; / Mx: PopUpMenuButton & gt; If this question is misunderstood,...

.net - Is there a way to unit test an async method? -

I am using NETMAT and NMK on the NAT platform. I am testing a presentation model where a method is asynchronous, the method creates an async function and executes it so that the system arrives immediately and the situation I see is not yet ready. I can set a flag on the finish without modifying the SU but it would mean that I Itemprop = "text"> Does your object end an asynchronous method of any kind of sign, such as an event? If this is the case, then you can use the following approach: [test] Public Zero CanTestAsync () {MyObject Example = New MyObject () AutoResetEvent waitHandle = new AutoResetEvent (false); // Create and append event handlers for "End" Event EventHandler eventHandler = delegate (Object Sender, EventArgs E) {waitHandle.Set (); // Signal that the event that ended was raised} Example Asynciminated + = EventHandler; Call the // async method example. CallAsyncMethod (); // Wait until the event handler is applied (wait! Handle.Wai...

javascript - jquery script is using to much memory -

I have the code below on the social network site, it loads a file that shows new notification messages to users, if They exist. / P> The problem occurs when I open the page for some time, it ultimately consumes lots of memory on my PC and starts to make Firefox non-responsive and tells an error message That memory is decreasing and I am asking if is there a way to do this, but without using so much memory over time? & lt; Script type = 'text / javascript' & gt; $ (Document) .ready (function () {var updatenotification = function () {$ ('# notificationcontainer'). Load ('http: //localhost/member/beta_new/notifications.inc.php'). FadeIn ( "Slow");}; var auto_refresh = setInterval (function () {updatenotification ();}, 60000); update ();}); & Lt; / Script & gt; What do you really do back I think this is a big ISH domain piece is. You can change the code just to return a little Jason string, check if there is a valid new noti...

Can you check through JQuery if a tab of the same ID has already been created? -

I have this script which creates a new tab in JQuery. Can you check through this code that if that special tab has been created? Thank you! function createTab (name) {var tabName = "# fragment-" + name; $ ("# Container-1"> UL). Tab ("add", tab name, name); Var newTab = $ (tabName) .css ("display", "block"); NewTab.html ("& lt; iframe src = 'ViewPatient.aspx? Pname =" + name + "' width = '100%' frameborder = '0' scrolling = 'no' height = '300'> & lt ; / Iframe & gt; "); }; $ ('element'). Size ()> 0

Design patterns NOT in the Gang of Four? -

We all know about a great book about design patterns, and pattern footer for Enterprise Know in I want to propose this configurable question to gather unusual software patterns for precise and good conditions, procedural programming, functional programming, OO and AO programming. Give complete freedom to your imagination and experience. Some related: An initial store of patterns already exists and The original wiki is. There is no point in refining the pattern wiki.

css - IE6 - Elements pop in and out -

As you can see from the upper image, the IE6 essentially has the same markup And divs with CSS sometimes pop and out in position, as I move the mouse around. I have no hover effects in it ... HTML markup & lt; Div class = & quot; Yellow Shieldlart Block & quot; & Gt; & Lt; Div class = & quot; Content & quot; & Gt; & Lt; H6 & gt; Shield Alert & lt; / H6 & gt; & Lt; Former orbit = & quot; Brush: xhtml & quot; & Gt; & Lt ;! - Content for Syntax highlighting - & gt; & Lt; / Pre & gt; & Lt; / Div & gt; & Lt; / Div & gt; CSS (partial) div.block {border: 1px solid; Padding-left: 32px; Margin: 5 px 0; Repeat Background: No Repetition; Background-position: 8px 5px; Background color: #EEBB; Border color: # d7d7d7; } Div.content {background-color: white; Padding: 2px 10px 1px 10px; Border-left: 1px solid #d7d7d7; } Div.yellow {background color: # fff67f; Border: 1px solid # e6e089; } Div....

php - How do I insert into PDO (sqllite3)? -

I have trouble putting a SQLT3 database with PDAs, you have to forgive my ignorance with the PDO, It seems that the foreign Python database is coming from the interface. So my problem is that I have a simple insert: $ dbh = new PDO ('sqlite: vets.db'); $ Count = $ dbh- & gt; Exec ("name, email, clinic, street name, city location, link, phone, fax, animal, area, visible) value ($ name, $ email, $ clinic, $ pathname, $ citystatezip, $ link, $ Phone, $ fax, $ animal, $ area, $ visible) "); $ Dbh = null; I just want to execute SQL commands on that database and should be done with it. Although there is no error in executing this script, it never updates the database. I have tried all the permissions on the database, even made 777 but it does not matter Can anyone help me? One of the great benefits of PDO is that you can make prepared statements. I have some code from a PHP project: $ qry = $ db- & gt; Prepare ('twocents (path, name, message INS...

MS map point web service -

Can anyone guide me through the following questions? MS Map Point Also cover India? How to use the MS Map Point Web Service or API or Library etc. to get current location based on input latency and longitude. Is there any feature to define our custom map and we can define our custom milestones on custom maps. If you know / So you already do not have the address location? No, I do not think you can define custom maps; But you should be able to add custom data

opengl - What are the "gotchas" when developing an iPhone Game? -

Used for developing business and context apps Now I have to do an iPhone game Define deliverables Specifying game play and other parameters Evaluate the development effort Test the game One big question, I know thanks! The main difference between business applications and games, especially on mobile devices, is the value of performance. An app that enters a form and waits for user input, probably not doing anything during this time. A game loop is running on the other side all the time and is probably doing a lot of things. Business programmers are not used to think in these words, but the games pull down the power of the battery and, whether or not they understand how you implement your game, it will have a great effect on how quickly the battery was drawn is. So, one question is, what is this game that you have to "develop"? If it is a Sudoku, no worries. If this is a real-time 3D space fight, then this is another story. If your business app was on t...

How do I get the number of rows affected by a BULK INSERT on SQL Server? -

How do I get the number of rows affected by a bulk INSERT on SQL Server? (2008 if this is the case)? Have you tried to check for @@ ROWCOUNT ? (Note: You need to define a variable = @@ ROWCOUNT before executing another statement, otherwise its value will be reset)

Can a worksheet object be declared globally in Excel VBA? -

I am restructuring several modules in an Excel 2003 workbook and declaring the same set of worksheets in each process in each Module goes; I want to declare them globally once. I can set the worksheet name in a literal form, for example: public consult xlwkGSModel = "gs_model" string like and then process In use: ... ActiveWorkbook.Worksheets (xlwkGSModel) .seel (1,1) But there is a way to declare a worksheet object So that the code can be in the process: ... xlwkGSModel.Cells (1,1) '1 enter a module ' 2 worksheet universal Announce the public variables in the module: Public Exclave GSODellel as Worksheet 'Instant this public variable in 3 app load events. > set the sub workbook open () xlwkGSModel = ActiveWorkbook.Worksheets ("gs_model") End sub 'You can now reference the gs_model worksheet with the XlwkGSModel variable 'For example dim x string x = xlwkGSModel.Cells (1,1)

synchronization - Date Filtering with the MS Sync Framework -

Using SQL CE to work with sometimes connected mobile devices and PDAs to obtain a merge replication After trying, after several accidents, decided to go to the Synchronization Framework. We have a scheduling application that has Master SQL 2005 DB, which updates SQL CE Dibies on many mobile devices. The Master Scheduling table has a detokacars field, which happens when the event occurs and this table can be recorded for many years - somewhere around the record of 10s Obviously we do not want to That mobile app SQL SEES has lots of records - just one week or so on either side of the current date. Is there a way to filter the recordings being recorded using sync frameworks on mobile devices? Thank you! Will this help:

html table - What's the closest jQuery approximation to YUI's DataTable? -

My two top priorities are progressive enhancements and inline editing. I have progressive increments () and inline editing (), but neither . Support for the jQuery UI theme would be nice, but there is a low priority. Update: Here's an example of what I'm thinking about how the solution looks: & lt; Table summary = "Full table of table table data" & gt; & Lt; Captions & gt; Increasing my table progressively & lt; / Caption & gt; & Lt; Thead & gt; & Lt; TR & gt; & Lt; Th id = "colA" & gt; Column A & lt; / Th & gt; & Lt; Th id = "colb" & gt; Column B & lt; / Th & gt; & Lt; / TR & gt; & Lt; / Thead & gt; & Lt; Tbody & gt; & Lt; TR & gt; & Lt; Td header = "cola" & gt; Foo & lt; / Td> & Lt; Td header = "colleb" & gt; Bar & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td h...

Hudson git clone error -

I have created a freestyle software project in Hudson. I want to clone a public GIT repository: Create failed with error message: User anonymous checkout: Work / C: \ Documents and Settings \ Administrator \. Hudson \ jobs start by \ water \ workspace - hudson.remoting.LocalChannel@1a1f370 final formation: # 4 Checkout: Vertical / C: \ Documents and Settings \ Administrator \ Khudson \ jobs \ Watir \ workspace - hudson.remoting.LocalChannel @ 1a1f370 cloning remote Git repository cloning stores original $ Jiaiti clone -o original git: //github.com/bret/watir.git "C: \ documents and Settings \ Administrator. Hudson \ jobs \ Vertical error trying to" next store : Not cloned from a repository Could FATAL: hudson.plugins.git.GitException could not be cloned: hudson.plugins.git.GitSCM $ 2.invoke (GitSCM.java:400) hudson.plugins.git.GitSCM clone at $ 2.invoke Could not be done (GitSCM.java:358) on Hudson. On Filepath.atiti (file Patkjawaः 676) hudson.FilePath.act (FilePa...

ajax - Auto-populating a list box of country names using jquery and the box's click event -

In my form there is a list box that demands the user's country but I can only list box through an AJAX call I want to populate, if the box does not already show the user's country, initially there is only one country in the list box - the country has returned to see the country of IP-to-country. It seems that the default action of the list box occurs before my event action. I want to do my first action so that when the user clicks on the list box, the box is already populated, since the servers are closed before the box opens. Thanks for any suggestions $ (). Ready (function () {$ ('select # selCountry'). ('Click', function () {var selCountry = $ (select 'selCountry'); selected = $ (selCountry) .val (); selCountry .html ('& lt; Option value = "" & gt; ... Loading ... / options & gt;'); $ .getJSON ('/ AjaxHelpers / CountryList', function (data) {if (Data.length) {var option = ''; (Val I = 0; I &...

Word Interop Not Working In A Scheduled Task -

I am currently developing a script that takes Word document, opens it in Word, and then the Word file Prints everything that works well on a PDF manually running on your machine or server. The problem occurs when I try to run it as a fixed task from the requirements One is that it is overnight without any interference Ia should be. When I set a schedule to do this and the security option "works only when the user is logged on" everything works just fine. The problem is that anyone should be logged in or without. If I have set the function to "Do not log on to the user to run or not", then the script fails in the following line: wordDoc = MSWord.Documents.Open ( Ref file, conversion, ref refFalse, ref RefTrue, referee RN, referee RN, referee RN, referee RN, referee RN, referee RN, referee RN, referee RN, referee RN, referee RN, referee RN, Riff RN, Referee RN); MSWord.Documents.Open () works but returns empty. This work is running on Office 2007 with ...

http - How can I detect if page was requested via a redirect? -

Loads of redirects that go to a particular page on a customer's website. This page should know in any way whether the request was direct (URI is manually typed) or redirect. All redirects are 301 redirects. Due to SEO regulations, the added indicators should be avoided. (Google with different values ​​to the URL) I have tried to check all the environment variables, but all of them are empty (which is normal) and There is no internal redirection in this regard, I think differently (I think). Detection needs to be real time, so log files are not an option. In a nutshell process, parameters are registered in cookies through a script, then it is redirected to 301 on the page where the content cookie is operated. I hope this makes sense. Previous: I was thinking about the situation when the content is registered, the content will not change back to the original. Code, but I'm not sure whether there is any way to read on the destination page. (We have made it clea...

How to get the Index Name from IndexId in SQL Server 2005 -

I am running the following query to list the size and fragmentation of the index: Select object_net as object (object_id, database_id), index_id, * to sys.dm_db_index_usage_stats Is there a SQL function that I changed to index_id I can use the index name I found a function on the page Which should help you: create dbo.index_name (@object_id int, @index_id int) Return as return system (selection name by sys.indexes WHERE object_id = @object_id And index_id = @index_id) END;

parsing bytes (C Windows) -

I have a DWORD value that can appear in hex: DWORD Val = 0xFF01091A How can I read each byte? What do I mean, how can I read FF, 01, 9 and 1A? Thank you! DWORD x1 = (0xFF01091A and 0xFF000000)> & Gt; 24; DWORD x2 = (0xFF01091A and 0x00FF0000) & gt; & Gt; 16; DWORD x3 = (0xFF01091A and 0x0000FF00) & gt; & Gt; 8; DWORD x4 = (0xFF01091A and 0x000000FF) & gt; & Gt; 0;

c# - How to add same behaviour to a usercontrol template as the gridview <Columns> -

ASP Gridwu tag When defining markup for column , one can only choose from a Is the predefined set of controls (ASP: Boundfield, ASP: Buttonfield etc.) I'm curious about whether I can add the same type of behavior, say that limiting content into custom control properties for a TemplateContainer defined in a standard user control "text "And" ImageUrl "and then handle the rendering of each element within the container from the code anyway? = "post-text" itemprop = "text"> OK, in the end I resolved it, which means that I can do the following & lt;% @ register src = "~ / controls / core / context menu" Askks "tagname =" Kantaksmenu "Tagprfiks =" UK "% & gt; & Lt;% @ register assembly =" Apakod "namespace =" Corner. Control. Contaks menu "Tagprfiks =" cc "% & gt; & Lt; uc: ContextMenu id =" ContextMenuMain "runat =" server "&...

Odd Sed Error Message -

bash-3.2 $ sed -i.bakkk -e "s # / sa / # / he / # g "।: Sed:। इन-प्लेस एडिटिंग केवल नियमित फाइलों के लिए ही काम करता है मैं किसी फ़ोल्डर में प्रत्येक डॉट-फाइल में हर / सा / के साथ / उसको बदलने की कोशिश करता हूं। मैं इसे कैसे काम कर सकता हूं? ढूंढने के लिए ढूंढें टाइप करें केवल फ़ाइलें नाम । * से मेल खाते और निर्देशिका । और .. को बाहर करें। -मेक्सडेप 1 रोकता है ढूंढें उपनिर्देशिका में पुनरावर्ती से। का उपयोग करके ढूंढें कहने के लिए sed कमांड को चलाने के लिए आप -exec कमांड का उपयोग कर सकते हैं। फ़ाइल नाम जाना चाहिए। ढूंढें -प्रकार f -maxdepth 1 -name '। *' -exec sed -i.bakkk -e "s # / sa / # / he / # g" {} + का उपयोग कर -एक्सएसी बैकटीक्स या xargs का उपयोग करने के लिए बेहतर है क्योंकि यह अजीब फ़ाइल नामों पर भी काम करेगा जो कि रिक्त स्थान या यहां तक ​​कि नई लाइनों के साथ भी काम करता है & mdash; हाँ, "foo bar \ nfile" / कोड> मान्य फ़ाइल नाम है एक माननीय उल्लेख को मिल जाता है -print0 | Xargs -0 ढूंढ...

asp.net - MasterPage textboxes are empty when accessed in code -

I have this website that has masterpieces and some content pages. The masterpage has a div in which I pop up when the user Clicking on the 'Login' link, which is located on the masterpiece, this login form has two text boxes, one for the username and one for the password, and when the user submits the form, they should be authenticated And the truth User information was entered in R All code to handle is behind the masterpages code. Here's the problem: When clicking on the masterpiece grabs the text from the text box to use in the impression authentication method, the code looks at the text What am I missing? Click here button and form which is located on the master page: buttonclick: bool ISUserAuthenticated = false; String Username = txtUserName.Text; String password = txtPassword.Text; IsUserAuthenticated = masterDataManager.AuthenticateUser (username, password); If (ISUsrrated) {session.ed ("user name", username); LblCurrentUserName.Text = ...

sql - TSQL - how to find if a column has a space char(32)? -

TSQL - How will it know that there is a single place char (32) in the column? Choose [some late] where the paradise ('', [some columns]) & gt; 0 does not work? Any ideas? You have to start curl columns. The CHAR column pad is up to the maximum length, with spaces on the right. The RTRIM string that is less than the maximum length helps to avoid false positives while storing. Insert dropme values ​​('in a place with') where the droptable value ('nospaces') is inserted into the dropme values ​​(' space bar) '(' Space bar) Select the rtrim (col) from the table dropme (foo char (32)), from 'Dropme to foo,', '|', where foo is like '%%' nospaces i | Have | A | Space space | Select the bar (foo, '', '|') from dropme, where '%%' like rtrim (foo) i | Is there. A | Space Location | Bar

What is Zend's console? When do you use this console? -

What does any of the Zend console use? Any sample program? console = shell, or command line if you have Windows and enter 'CMD', if your Near Mac Open Terminal Console scripts are useful for long processes or things that you want to schedule regularly to be (refer to 'Cron' Royal). For example, I wrote a link checker script to check the links for websites, we developed. It is used to help QA sites and check for errors. This command looks something like this: php linkchecker.php The third bit is any argument that the script has been passed. It can be easily accessed through Zend Console Getopt, which is the only stable component of Zend_Console I know. More information about Zend Console Getopt - It has a description of the Z console which is on the developer wiki, but I do not know that it is currently evolving -

ms access - accdb vs mdb. Which is faster/better? -

Is there any experience using access 2007 with prior versions of access (i.e. MDB files). We have been upgraded, but still using the MDB format. Some of our codes (especially Docmd.D Transmers Database ACMport Report) are now incredibly slow. I tried a preliminary examination and our client changed MDB to ACCD and the aforementioned Transport Database was looking for better performance. Now I am thinking that we should cut the bullet and convert all the other files that make the application. There is no need for replication or user-level security, which is only the only new version of the old version. We have a client MDB, three backend databases, and after that there is a report (not a question!) Every 3000 MDBs. What new version does the older one faster - especially the already struggling network)? Make something new in ACCDB (according to the interface); MS SQL Server creates a new database. Exclude existing goods in MDB; If this is working now, then why is it wr...

php - how to add time in mysql query -

I am using this query Select date_time_posting from the table, where FROM_UNIXTIME (date_time_posting, '% D-% m-% y') = '$ c_day_date' Where $ c_day_date is being dated in the format dd-mm-yy such as 25-27-2009 My server is at different times My area has some difference about 6 hours ie that my local timezone is 6 hours ahead of my server time zone. This query runs around midnight at approximately 1:00 am in my timezone, but at that time my server remains at the previous day's date. Then the question at that time is not giving me the desired results. Why this problem persists when everything is already done with the data stored. At this time the difference is my query and how can I improve it ???? You can set the timezone per customer by sending a query such as: $ Sql ​​= "SET time_jon = timezone;" Check the manual to correct this problem.

.net - Auto-converting numbers to comma-fied versions -

निम्न पाठ को देखते हुए / feeds / tag / remote-desktop 1320 17007 22449240 / फीड / टैग / टर्मिनल सर्वर 1328 15805 20989040 / foo / 23,211 / परीक्षण 1490 11341 16,898,090 मान लीजिए कि हम, उनके कॉमा-fied रूपों के लिए उन संख्याओं को परिवर्तित करने के लिए इतना / फीड की तरह चाहते हैं / टैग / रिमोट डेस्कटॉप 1,320 17,007 22,449,240 / फीड / टैग / टर्मिनल सर्वर 1,328 15,805 20,989,040 / foo / 23,211 / परीक्षण 1,490 11,341 16,898,090 (निश्चित-चौड़ाई ASCII रिक्ति ठीक करने के बारे में चिंता मत करो, कि एक और दिन के लिए एक समस्या) यह सबसे अच्छा regex मैं के साथ आ सकता है; यह Regex निंजा स्टीवन लेविथन से पर आधारित है:?! लौट Regex.Replace (रों, "@ \ b (& lt; \ /) \ घ {4,} \ ख (& lt;? ! \ /) ", प्रतिनिधि (मैच मैच) {स्ट्रिंग आउटपुट =" "; स्ट्रिंग एम = मैच.वैलू; int len ​​= match.Length; for (int i = len-1; i & gt; = 0; i-- ) (आउटपुट = एम [आई] + आउटपुट; अगर ((लेन-आई)% 3 == 0) आउटपुट = "," + आउटपुट;} यदि (आउटपुट। तारों (",")) आउटपुट = आउट...

artificial intelligence - Why does A* path finding sometimes go in straight lines and sometimes diagonals? (Java) -

I am in the process of developing a simple 2G grid based sim game, and in finding a fully functional path. I used the answer given in my previous question as a basis for implementing A * path search. (). To show you what I'm actually asking for, I need to show you this video screen capture which I have created. I was just testing to see how the person would move in one place and come back again, and the result was ... Path on the basis of direction Different options, an unintended consequence, any thoughts? If you are looking for a simple-eye solution, can I suggest a little bit Randomness? What do I mean: In the code code code example, there are nested-to-loops that generate "successor state" (to use AI word). I refer to the point where the "current" state is loop over 3x3 square around the state, to consider it, add new place on the heap. There is a relatively simple improvement (should be done :)) bit, and say, before the processing step,...

php - implode invalid arguments -

फ़ंक्शन हटाएं ($ पंक्तिआईड) {$ rowids = implode (",", $ rowid); $ Sql ​​= "पीएमएस WHERE आईडी से हटाएं ("। $ Rowids। ")"; प्रिंट $ sql; } If (isset ($ _ POST ['submit'])) {delete ($ rowid); }? & Gt; & Lt; form method = "post" action = "test.php" & gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "पंक्तिगत []" मान = "1771367" /> gt; & lt; br & gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "पंक्तिगत []" मान = "345342" /> gt; & lt; br & gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "पंक्तिगत []" मान = "572347" /> gt; & lt; br & gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "पंक्तिगत []" मान = "902358" /> gt; & lt; br & gt; & Lt; इनपुट प्रकार = "चेकबॉक्स" नाम = "पंक्तिगत []" मान = "234654" /> & lt; br & gt; & l...

asp.net - How to get events to be handled in a particular order in C#? -

I had this idea of ​​entering an event in a base custom page on every button. I can check that it was saved or edited and after that the authorization and verification were done. The derived page still handles the click event to save on that page. I was not sure which incidents would happen for the first time (but this is probably in the order of the wireup) if the parents run the page first, then the candidate behaves by setting an IsAuthorized or IsValidated property and checking into the click handler of each derivative page. Can get it. Either way, is there a way to run the event handler of the base page and complete it first, or is there any way to defend it? Edit: Am I seeing a simple design for which there is no need to add boiler plate code to each edit / save / update button hander in the application? And what is the right way to communicate with one another for an incident? For example, the base page needs to be communicated to verify the success or failure, the succ...

eclipse - How can I show the windows file explorer in the RCP application? -

I would like to create an Eclipse RCP application, in which I need to show windows file explorer in the view. Could? Do you really need to show Explorer? Would not it be enough to display the content of the file system in a standard SWT widget? Anyone can be useful to you.

firefox - How do I enable Firebug 1.4 only for specific domains? -

In FireBug 1.4, there is an option to enable or disable all pages though I (Usually) only temporarily want to enable it for only one domain. In earlier versions, it was trivial, but I can not get it in 1.4 anyway. (For reference, I have open several tabs, many of which are open. Ajax heavy (eg, Gmail or Google Docs) that do not play w / firebug well. So if I want to see quickly, crawl to say an HTTP response code for a particular site, I have enabled firebug for all the sites to make my browser.) Unlike previous versions of firebug, if you have Is closed and it is not set to "for all web pages" it is not actually running when you open the panel and actively use it, then is only . Solution: Open it only on the domain that you want to use it. It does a great job of remembering (at least for me).

java - Could the Drools update method potentially be causing my problems -

I am currently writing an application using Drools 5.0. This application is running a bit slow, but I have a theory why this app already receives many updates for the facts stored in the Knowledge Session. Under the hood the drals update function is actually a comeback, then there is an entry. There are more than 200 rules in this application: Some rules are written when some facts are removed. Other rules are written in the fire when some facts are called in the knowledge session. Since the update is actually a comeback, then will there be an exhaustion and insertion related rules still under fire during an update? Regardless, nothing can be really 'put' or withdrawn from the knowledge session? One thing to note, I have bowed down the working memory logger for my knowledge session to get a better idea about what is happening. When I saw many unexpected return / entry rules-activation composition being added to the agenda, but it seems that they are never active. It seems...

templates - C++ templated container class: How to best support both ordered and un-ordered item types? -

I am writing a templated C ++ generic container class which alternately creates its content in a well defined order Can keep Earlier this function pointer was used so that its contents can be ordered in a specific way in a specific manner, but I am trying to use templated functor arguments to replace it. Since it is often done that the class users place different types of sorted items in separate containers, the container class takes an optional template argument that users Alternatively, your own comparative physician specifies: template ItemType, compare the category: Factor type = comparisonfactory & lt; Item type & gt; & Gt; Class MyContainer {[...]}; If the class user does not specify a custom mixer type, then it uses the following comparisonfactor definition from the default: template & lt; Typename itemtype & gt; Compare to the category Factor {public: Bull izitem lathesan (Const. Item type and a, cost item type) & amp; B) Cost {Return (A ...

c# - how to dump response headers in ASP.Net -

I am using VSTS 2008 + C # + .NET 3.5 to develop ASP.Net. I want to dump all the feedback headers back to the client for a specific aspx file, how to do this easily? I know how to use feedback. Header collection, but my confusion is where to get the exact response title? For example, if I say in Page_Load, then all the response headers can not be calculated, but if I tell after the response. Close, the exception will be thrown. Any advice? EDIT1: While using OpenRender in VSTS 2008 debug mode, meeting with the following exception (i.e., by pressing F5 to debug) {"This operation is done by IIS integrated pipeline mode Required. "} Protected Override Zero Opener (EventAgds E) {base.OnPreRender (E); (Author: WriteLine (DateTime.UtcNow + "Feedback Header") using the author (new streamer writer = new streamer ("dump 123.txt", true)); Foreign (HTTPCTXCount.Respons.HeaderKeys in Straight Items) {Authors. Videoline (item + ":" + HTTP Conte...

What is OnActionExecuting defined for in ASP.NET-MVC's AccountController? -

Project template for ASP.NET-MVC includes an AccountController that contains the following part of the code Protected Override Zero Onnection Execution (Action Accepting Contact Filter Context) {If (Filter Contents ..httcx User is Identity Windows Identity) (New Invalid Operation Expansion) ("Windows authentication is not supported."); }} What's for this? For information on the method, see. Notifying you are throwing an exception if the website has been set up to use Windows authentication, in effect, prevent it from being used as a method of authentication.

php - Detecting AdBlocking software? -

I recently went to see that in one section of the page it was said that I have found that I use the adblocking software I am doing and I please turn it off to help support a small site like this I was thinking how would you do this? Would it be best for client-side or server-side? It's something that just can not be done on the server side - knocking at your door For the person is the reason for the district and say "I see, I have an AdblockPolls!" At the client side, adblock is actively trying to influence the contents of the page, which is something you can see and see that they are using an adblock. Still, I came to know that newgrounds.com is also doing this (their new layout was spoiled for more users than Adblock - as a response they would be the best "if you We are not going to help us through our advertisements, so go buy some in the shop. "- Banner. A quick look at the source of the new plots told me that they do this with some simple javas...

maven 2 - Running resource filters when using jetty:run -

I am using resource filtering on JavaScript based on profile. I am also developing locally by using mvn jetty: run , but have not run the filtering phase. How do I filter using the JT plugin? Configuration snippet : & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 2.0.2 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; WebResources & gt; & Lt; Resources & gt; & Lt; Directory & gt; Src / home / webapp & lt; / Directory & gt; & Lt; Included & gt; & Lt; Included & gt; Error.jsp & lt; / Include & gt; & Lt; / Include & gt; & Lt; Filtering & gt; True & lt; / Filtering & gt; & Lt; TargetPath & gt; / & Lt; / TargetPath & gt; & Lt; / Resources & gt; & Lt; / WebResources & gt; & Lt; / Config...

PHP Session Data Not Being Stored -

I am creating a login system, but when a user logs in, then it actually stores any data I do not want to do it in session. I also checked the session file, and it was empty. I have session_start (); On all the pages what I was doing wrong is the code for two main pages. Login Code: & lt;? If ($ DEBUG == true) {error_reporting (E_ALL); } "Header.php" is required; Need_once "dbinterface.php"; Need_once "user.class.php"; Need_once "config.inc.php"; $ Db = new db ($ db ['host'], $ db ['user'], $ db ['pass'], $ db ['database']); $ U_result = $ db- & gt; Play ("Choose user_id from user where user_name = '". $ Db-> escape ($ _ POST [' user_name ']). "'"); If ($ u_result == incorrect) {$ url = 'Location: error.php? Id = 8 '; Header ($ url); } If (count ($ u_result) & lt; 1) {$ url = 'Location: error.php? Id = 3 '; Header ($ url); } $ User = new use...