Posts

Showing posts from September, 2014

c# - .NET Remoting Singleton memory leak, TCP, Marshal by Reference -

I am using the simplest example of remoting which I can get, a window service and a Windows form program Sharing the middle item (client), running on the same machine. The service instantates the object in this way: serviceConfigRemote = new serviceContentDataTermot (); ServerChannel = new TcpServerChannel (9 090); ChannelServices.RegisterChannel (server channel, incorrect); Remoting Services Marshall (this. ServiceConfigRemote, "ServiceConfigData"); The client establishes a connection like this: TcpClientChannel channel = new TcpClientChannel (); ChannelServices.RegisterChannel (channel, incorrect); ConfigData = (serviceConfigDataRemote) Activator.GetObject (typef (serviceConfigDataRemote), "tcp: // localhost: 9090 / service configuration data"); This idea is for service to change some parameters of the object, because the client is able to read those changes. The object is itself: Public Seal Class Service Confidentiality: Martial Biriff Obj

html - Switch to SSL using a relative URL -

I would like to create a relative link that allows the existing protocol http to https . I worked at the last place, something was installed on the server so that you can do it, but I do not remember much about it and I did not know how it works. The argument for this is that I do not require hardcod server names in files, which need to be moved between production and development environments. Is there any way to work in IIS 6.0? Edit: I am using .NET, but the "link" I am creating will not be dynamically generated . If you really want knightly gritty details, then I am using a redirect macro in Umbraco for which the url has to be passed. Here is a simple solution in VB.NET: import System Web. HTTTX public side subset SSSSSL (Boolean = Optional alternate biowal enabled) Request.IsSecureConnection then retard strHTTPS as string = "https://www.mysite.com" current. response. Clear (current) response. Status = "301 permanently gone" cu

perl - What happens on this my declaration? -

I know that the title looks strange, but I found this snippet somewhere: < Code> MyPackage $ P1 = MyPackage- & gt; new; $ p1 ? Edit: I'm running Pearl What role does the name of the package 5.10.1 From: My TYPE EXPR: ATTRS A declares the local (lexically) attached block, file or eval to my listed variables. If more than one value is listed, then the list should be placed in parentheses. The correct meaning and interface of TYPE and ATTRS are still evolving. TYPE is currently bound to use the Field Progam, and the attributes that start with Perl 5.8.0 are controlled using the attribute prema, or via attribute :: handler module.

Silverlight - Perspective 3D -

I am considering using Silverlight for a project on which I am working. This project has to show a 3-dimensional cube. Is it possible in Silverlight? I get many examples which are basically a favor of 2-one item. Is this "perspective" 3D like a sheet of paper? How is 3D perspective different than normal 3D? Thank you! You should look for Silverlight; Anyone has created a site, but currently only three reference articles And kit has a link to 3D. According to the 3D it is also possible to simulate it.

windows - Pipe communication C++ -

I'm writing two little C + apps that should be communicated first, there will be one such service, In time the user should be alerted for some. Since I can not create a service window I have created the app to be two different executables. Services will use an indicator to communicate. To send text messages only to the need indicator, a balloon will appear in the system tray. I am trying to use designated pipes and I think I'm almost there, but not quite. What I have so far: The indicator side: m_hInPipe = CreateNamedPipe (L ". \\\\ \\ pipe \\ nhsupspipe", PIPE_ACCESS_INBOUND, PIPE_WAIT , 1, 1024, 1024, 60, NULL); I mean nhsupspipe named a pipe, created an inbound pipe in the service side:.! If (WriteMy_HOutPipe, "My Message to User?", 23, & escritos, & amp; o) std :: cout & lt; & Lt; "Error:" & lt; & Lt; GetLastError (); Debugging I can see that it is all right, the pipe is created and writeFile wr

sql - MySQL: splitting one table to multiple tables (same columns) for performace increase? -

This question is about performance, not about possible solutions. My system holds several items of different categories, each category has its own table because each table has several rows and the fields are different. ItemA - id, fld1, fld2 itemb - id, fld1, fld3, fld4 itemc - id, fld1, fld3, fld5 .... Now user inventory needs to be managed, i.e. whether the user has an item or not. An option is using a table: list - category_id, item_id, user_id category_id ItemA, ItemB, ... different for rows And how do we differentiate it. The second option is: Inventory A - item_id, user_id inventory b - item_id, user_id ... The easiest to manage, but the inventory table is very large (the order of magnitude: the number of numbers of users of all categories) and repeatedly updated and frequently inquired. The second option would be a bit difficult to manage (as we create a new list table for each category) but can offer a performance advantage because it can stop runn

search - Number of google pages hits as a function of time -

You can see the number of Google pages found in every search in Google. Is it possible that what was this number in the past? The best that you can try is not the number of pages found, but this keyword Information about the popularity of, example:. You can also see the popularity of a website, example:. No other Google service comes for your particular purpose.

Java Swing JList -

I am trying to create a JList to display the content of an array. The array itself is not an array of wires, however, but an array of objects. Is it possible to use the same array of objects as a parameter in my Zelist (if the objects are given a toString method)? Thank you. Yes it is. A list uses an object called a cell renderer so that it can display each of its items. The default cell renderer knows how to display the strings and icons and it displays the object by applying toString . See:

How to add multiple query folders in LINQPad? -

In the lower left corner of LINQPad, there is an area for the display query. One tab is my question and the second is for samples. There was no way to add more than one folder to my queries, like one in the sample tab I checked all menu items by clicking on the right menu. I'm not sure that I can change the XML settings to include more than one folders in my queries to organize my code. How can I do multiple query folders in LINQPad? There is currently no way to display more than one root folder in 'My Queries'. If you want, add a suggestion to linqpad.uservoice.com so that we can ignore the demand.

design - Any C# SmartDate converters out there, e.g. "sun 11" --> 2009-12-06 11:00:00 -

In the spirit of revising the wheel, someone can ask me to empty the C # code " Sun " -> 2009-12-06 00:00:00 "< Strong> Tom "-> 2009-12-06 00:00:00 " Tomorrow "-> 2009-12-06 00:00:00 < / Li> " Mon 8pm " -> 2009-12-07 20:00:00 " 5 in 10 " - > 2010-01-05 10:00:00 and periods that return two datetime like this: " from January 5, 8 to 10 " -> 2010- 01-05 20:00:00, 2010-01-05 22:00:00 This issue is a library for developers, which allows users to type in their own words Allows you to enter the upcoming dates so that if you want to work on " Friday, you want to type " just " free " And what computers mean you know . If your users are actually sitting behind the browser, then what you are looking for from this library They are:

wordpress - sidebar covers footer in internet explorer 6 and 7 -

I have designed a template for WordPress, the problem is that when the Sidebar takes some time, then Internet Explorer 6 and 7, Website address: (in Persian), but if you look at it in Internet Explorer 6,7 you will see the sidebar logo footer, for example in this page: But the website is fine in other browsers, what's the problem? float in css if you are using clear: both; to make sure & lt; Div id = "main_content" & gt; should not be floating The only sidebar should be set with the float: left , if you want the right sidebar, then you float: right . See how to design a two column liquid. + --------------------------------------- ------ + + HEADER (no float) + ----------------------------------- ---------- + + Sidebar float: left + content (no float) + -------------------------- ------------------- + footer (no float) + ---------------------- ----------------------- + You are currently on the page like this + ---------------

Getter Accessor not functioning, iphone sdk objective C -

I am trying to do a very simple job in this program. Once the launch of the App, I am trying to launch CLLocationManager and after getting updated, I am getting the current location. My app works in it that gets the current location, when I NSLog the current location it works fine. The problem is that I am trying to move this place from one object to another and it does not have any value when it is received. I am looking at the accessory methods and I think that all these are correct in my program all types of operations I have tried to follow many examples but no one is working. Here's some code. This is the CL LevelenenderDelegate. The file is @ Interface yogaAlive app Delaygate: NSObact & lt; UIApplicationDelegate, CLLocationManagerDelegate & gt; {CLLocationManager * locationManager; CLLocation * mycurrent location; Float cutlets; Float curls; BOOL locationDidUpdate; UIWindow * window; YogaAvailability Controller * View Controller; } @ Property (Nonomatic,

asp.net - Setting write permissions on godaddy hosting -

I have godaddy asp.net hosting every time I upload the build, then write it through the web interface There is a manual painstaking task to set permission (folders) Is it automated to use any number? can do this & Lt; / Fileset & gt; & Lt; / Attrib & gt;

How do I select part of a BLOB field in Oracle? -

I have a table in Oracle that stores files in the form of byte arrays in a Blob area. I want my client to be able to download the archived file in small portions (as the whole thing is downloading at one time) so I can display a progress bar. How can I write an Oracle query only the part of the content of a Blob field retrieve? I think this will be something like this: SELECT PARTOF (Blobelied, 1000, 2000) AS CHUNK from tbl Where ID = 1 If I want to To get 1000 bytes from BLOBFIELD, starting with Bite 2000 As a secondary question, is there any display problem in it? If Oracle needs to load the entire Blob field to load it into memory, then it will not be a good idea. What can you use?

Getting the cURL stream in PHP -

If I run curl_exec with no option, then fetch The page that has been output gets output to the standard output of php (back HTML page is served). If I run it from the RETURNTRANSFER option, then I can get the whole page in a variable. How can I get a stream that I can parse manually? In 1 case, I can not access data, parse it and in case of 2, I have to wait until it is completely downloaded before starting to purse it. I would like to do something similar to fopen () and fread () as fread ($ curl_handle, 1000) as soon as you read 1000 bytes , And after reading 2000 bytes, the second call will return, etc. You may be interested in this: I explained and used to use striped rappers with curls Given an example, it is being received to be capable of receiving data - which you think is what you want to do. Probably not the exact answer to your question, but it may be that you are required to implement any solution ;-)

git - what have I done? -

मैंने किया था: git क्लोन जीआईटी: //github.com/xyz/xyz .git git टैग -l रिलीज़-1.0.0 रिलीज़-1.0.1 रिलीज़-1.0.2 जीआईटी चेकआउट रिलीज़-1.0.2 जीआईटी चेकआउट -बी एक्सआईज़फ़िल्टर और अब मुझे लगता है कि मैं टैग ' रिलीज-1.0.2 ' के आधार पर xyzfilter नामक एक नई शाखा है। क्या मैंने क्या यह सही ढंग से करते हैं? हां, यह सही लगता है, यह मानते हुए कि इसमें कोई बड़ी त्रुटियां नहीं थीं किसी भी आदेश का निष्पादन। यदि रिलीज़-1.0.2 एक शाखा के बजाय एक टैग है (जो इसे सीधे क्लोन के बाद काम करने के लिए होना चाहिए), तो यह एक 'अलग सिर' बनाता है और टैग पर संस्करण की जांच करता है। git चेकआउट रिलीज़-1.0.2 फिर यह कमांड वर्तमान में चेक आउट के आधार पर एक नई शाखा बनाता है संस्करण (जो कि टैग को अभी चेक किया गया था) और नेन में स्विच W शाखा। git चेकआउट- b xyzfilter

asp.net - Datareader's value in javascript array -

I want to get the image name, and I want to pass the value of 3 more fields in the JavaScript array to the database. ... will be generated from the database (image name and 3 fields) .... var leftrightslide = new array () var finalslide = 'leftrightslide [cnt] =' AJAX for contact between javascript and scripting languages ​​ XMLHTTPRequest object

How to set WCF security to require client certificate? -

I have a WCF service. I ask customers to certify with certificates This service configuration is: & lt; System.serviceModel & gt; & Lt; Services & gt; & Lt; Name of Service = "Film Library. File Manager" Practice Report = "Film Service. Service 1 Carrier" & gt; & Lt; Endpoint address = "manager" name = "certbinding" binding = "basicHttpBinding" contract = "moviecutter.film manager" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; Binding & gt; & Lt; BasicHttpBinding & gt; & Lt; Bond name = "custom_step" & gt; & Lt; Security mode = "message" & gt; & Lt; Message client CredentialType = "certificate" /> & Lt; / Safety & gt; & Lt; / Binding & gt; & Lt; / BasicHttpBinding & gt; & Lt; / Binding & gt; & Lt; Behavior & gt; & Lt; ServiceBehaviors & gt; & Lt;

php - SQL query's organisation, transforming url into title from db -

I currently have a site with many articles generated by users as content on each new post, a hidden $ The getcurrentpageurl variable is when a user is reading a post (x), a form button that says "Give this feedback on this post" sends the user to the submit form, in which a hidden field posts $ getcurrentpageurl, and it Automatically new articles (y) By doing so, the new article (y) can again show something like this: "This post is in response to www.mysite.com/articles/thearticle(x0" My The question is, how do I go about transcribing that URL into the title of the article x and presenting it as a link to the URL? If it helps, then save all the posts in the SQL database. A title field, a text field etc., so I get a title from the title field with the title Thank you in advance! More information: / P> The database $ getcurrentpageurl variable is what it says, it reads the URL of the current article. When the user presses "answers" on th

html - The proper way to handle popup closing -

I am looking for a close event for popup. I've got one, but I need it for HTML. The property has closed in the popup. & gt; & Gt; & Gt; Var popup = open ('http://example.com/', 'popup', 'height = 400, width = 500'); & Gt; & Gt; & Gt; Popup.closed false Well, I can do it. function open_popup () {var popup = open ('http://example.com/', 'popup', 'height = 450, width = 450'); Var timer = setInterval (function () {if (popup.closed) {warning ('popup off!'); Clear interval (timer);}}, 500); } I tested it on Chrome 4.0.249.27, Opera 10.10, Safari 4.0.4 and Firefox 3.5.5. All work is fine. But Set Interlude Me Distress Is It Ugly Is A Better Way To Do It? Update: I use Popup for authentication dialog (in fact, oAuth). I want to send some messages after the popup is closed (via post message). Page inside popup from any other domain. Therefore, I can not add any event ( unload ) due t

model view controller - How to use the Facade.Instance method without object construction? -

I recently completed an entity on software patterns and is now trying to understand the PureMVC framework. One thing has got me stumped, which is simple for the gurus here. I am trying to make an example of the singleton mask class. In the constructor, the comment status: This is the IFKAd implementation singleton, so you should not call the constructor directly, but rather call the static Singleton Factory method mask. How can you call the example method when the mask object is not created? Mask. Instance method looks like this: public static IFacade example {get (m_instance == null) {lock (m_staticSyncRoot) {if (m_instance = = null) m_instance = new mask (); }} Return m_instance; }} You are reaching a static property, part of the definition of static properties class Are not class examples To access a stable member (property, area, method), simply use a class name dot member: var myFacade = SomeClass.Instance;

Custom text macros in Xcode not getting invoked with control-dot -

मैंने ~ / Library / Application Support / Developer / Shared / Xcode / Specification में "ObjectiveC.xctxtmacro" फ़ाइल बनाई है कोड bellow मुझे Xcode के संपादन> सम्मिलित पाठ मैक्रोज़> उद्देश्य- C मेनू आइटम में "हैलो" दिखाई देता है, लेकिन जब मैं इसे नियंत्रण-डॉट का उपयोग करने का प्रयास करता हूं, तो कुछ भी नहीं होता है कोई भी विचार? ({आइडेंटिफ़ायर = ओबजेसी .होल्ड; बेसऑन = ओब्जेक; आईसमेनुइटम = हाँ; नाम = "हैलो"; टेक्स्टस्ट्रिंग = "हैलो, एक्सकोड!"; पूर्णणप्रिक्स = "हैलो"; IncludeContexts = ("xcode.lang.objc");}) आपको इसकी आवश्यकता है अपने मैक्रो में एक केवल एट बीओएल विनिर्देशन जोड़ें। इसे आज़माएं: ({आइडेंटिफ़ायर = ओबजेसी .होो; बेसऑन = ओब्जेक; केवल एटबॉल = हाँ ; IsMenuItem = YES; नाम = "हैलो"; टेक्स्टस्ट्रिंग = "हैलो, एक्सकोड!"; CompletionPrefix = "हैलो"; कोइन्टेक्ससेट = ("एक्सकोड.लैंग.ओबीजेसी");}) मैं पाठ मैक्रोज़ पर बहुत ही नया हूँ, लेकिन जहां तक ​​मैं समझता हूं

vb.net - How to deploy my program into a CD? -

I am trying to use VB 2008 Express Edition in my program CD but no progress has been made in this long From time to time, when you run setup.exe on another computer and in the end this is just a pop-up error, I have followed the proper setup process on how to publish the program in the cd and with all necessary prerequisites and supporting files Success It was able to publish it in due course. But when you open the setup.exe using the computer from another computer, it will deploy the program to that computer and display a window that tells you 3 buttons, details, try again, download the necessary files After canceling such error. Is it the case if my OS is Vista and the computer where I'm deploying is using XP program? What could be the reason for this problem? How can I solve this issue? A Possible Solution: Compile / check your project again in debug mode. Burn a CD with the contents of your debug folder.

cocoa - KVC select by criteria -

I have the objects selected from the core objects. I choose from a subset of this set of conditions, which is in conformity with the condition. How to do this If I read you correctly, then you want to filter your condition based on a condition By some objects in it? You can do this by using NSPredicate and call on your array. NSPredicate * predicate = [NSPredicate predicateWithFormat: @ "attribute == Yes"]; NSArray * filtered array = [original array filtered attribution: prediction]; You can read more about using predicates. You can filter your NSFetchRequest directly while getting data from the core Can use predicates for data

What is the best way to call Java code from Python? -

I have a Java class library (third party, ownership) and I want to call my dragon script my actions to do. I already have a Java code that uses this library. What is the best way to achieve this? Can you run your current Python script down? If so, then perhaps this is the best way, because the Java Library can directly appear in the form of Javothan objects. Upon consideration, several solutions are listed.

lua - WOW Addon Development / Events -

Not sure if this is a suitable programming question; But here goes .... But I have written a very simple add-on that shows the text / plays a play, when some strong (overwire / revenge). But I am unable to find the appropriate event for listening to see it. My hack-ish approach is only when whenever any incident is passed to me, I am checking the status of those mantras which cares for me. Is there a specific event that I can use? I went through docs on WWE and I do not find anything relevant. An addon that you spelled, I forgot its name ... it was great! For a little while I was more angry, I knew what to do with it. But the Blizzard decided that he was taking too much action with the player's hands, so he stopped closing down the events for such things. Specifically, his policy about 2 years ago, the player's events (moving, casting, etc.) can be started from the events of the game. Nowadays, checking the hook and position in things like the addons movement

xsd - Combining HTML and XML from one schema all nested within an element of yet another schema -

I have been working on learning XML Schema for the past few years, off and on is a great handle on the basics But one thing still gets rid of me: I want to create an XML document like the following: & lt; Itemlist xmlns = "http://mydomain.com/namespaceA" & gt; & Lt; Items & gt; & Lt; Html xmlns = "http://www.w3.org/1999/xhtml" xmlns: nsB = "http://mydomain.com/namespaceB" & gt; & Lt; Body & gt; & Lt; P & gt; There is no HTML code here, but I want to be able to markup & lt; NsB: myBTag & gt; & Lt; Strong & gt; Some & lt; / Strong> & Lt; / NsB: myBTag> Even with tags with name tag B, those tags are nested inside standard HTML tags and even if there are nested HTML tags within the tag of my names. & Lt; / P & gt; & Lt; / Body & gt; & Lt; / Html & gt; & Lt; / Item & gt; & Lt; / ItemList & gt; Note that & lt; Html & gt; The reason i

Trying to derive a 2D transformation matrix using only the images -

I do not know whether it should go to Math Forum or Programming Forums, but I will post it in both of them and see where I will get. I have two computer images ... one of these is the "original" image (big TIF file). The second basic is a converted version of the original image ... it has been rotated, mirrored and translated into a software program. I need to do some work on the transformed image, but I need the xy coordinates of each pixel in the original image to end my calculation. I know that the image was rotated and a 3x3 change matrix was matrix, so I could get the second image for the first time (or vice versa) I do not know how much it was rotated , Pigeon or translate, so I can not just get the matrix from a set of known changes. In each picture I have a set of related points (corners, et al), and their respective (x, y) coordinates, then this is my dilemma: Related transgated points (X, Y) -> (using a set of X, Y ', three or more of them), can I g

Why can't Java find this constructor? -

पैकेज पैकेज। B; क्लास कक्षा बी {सार्वजनिक क्लासबी (बेस क्लास बीसी, एक्सएमएलबेस ओज 1) {}} आयात पैकेज.बी.क्लासब; क्लास ए बेसक्लास {सार्वजनिक शून्य समारोह () का विस्तार करता है {परीक्षण XML obj1 = नया TestXML (); क्लासबी बीओबी = नया क्लासबी (यह, ओजजे 1); }} जब मैं उपरोक्त कोड को संकलित करता हूं, मुझे एक त्रुटि मिलती है "प्रतीक प्रतीक नहीं मिल सकता है: कन्स्ट्रक्टर क्लासबी (क्लास, ऑब्जेक्ट 1)" लेकिन जब मैं दोनों तर्कों के लिए "अशक्त" पास करता हूं, यह ठीक संकलित करता है। ऐसा क्यों? क्या कोई मेरी मदद कर सकता है? TIA आपका त्रुटि संदेश आपके द्वारा दिखाए गए कन्स्ट्रक्टर कॉल से मेल नहीं खाता। आपको मिल गया है: // कोड में सार्वजनिक कक्षा (बेसक्लास बीसी, XMLBase obj1) // त्रुटि संदेश में कक्षा बी (कक्षा, ऑब्जेक्ट 1) < P> क्या Object1 है, क्या XMLBase है, और क्या है TestXML ? इसके अतिरिक्त वहाँ अमान्य पैकेज नाम है जैसा कि विन्गर ने इंगित किया बाहर। यदि आप एक छोटा लेकिन पूर्ण उदाहरण बना सकते हैं जो असफल हो रहा है, तो इससे मदद मिलेगी फ

Change specific column values in R -

I have a table where "NA" is present in all the places, especially in one column, each example of "NA" Want to change with something else - say, number 1 How should I do this? Jonathan found the correct answer for the vector, using which you applied the column to the data frame data You can: & gt; Dat & lt; -data.frame (a = c (11,2, 11, n), b = c (1,1,1,1)) gt; Dat $ a [is.na (dat $ a)] & lt; - 1 Deducer produces the following code for the completion of the 'Record Variable' dialogue, which can do more complex recodings. & gt; Library (DDUs) & gt; Dat [c ("a"]] & lt; - recode.variables (dat [c ("a")], "NA -> 1;")

php - What should I store in cookies to implement "Remember me" during user login -

I have a login system for my website, user details stored in the database email address < / Strong> (unique), display name (not unique), password and members . Now what should I store in cookies? I was thinking of storing a user's cookie with an expiration date and then if the user comes back to my website after signing up for a cookie and logging in (how do I look right ) And delete the cookie if it decides to log out. * A small explanation will also be very helpful thanks, you can only store the user ID in the cookie if you sign it with a secret key which only know your application otherwise it will not show any cookies for the user. It is possible to change and login as someone else. Therefore, if you want to store user-aid, you also want to store a hash of user id with secret key (ideally used) and when you want to log in them, calculate the same hash and Compare the cookie to hash. Another solution is to generate a random token, store it in the database and

ibm midrange - Is CPYTOIMPF to qtemp faster than to other library? -

I am a programmer working on IBM AS-400V5R4. I create 2 CL programs, both of which use CPIO IMPF to format the AS 400 PF formatted demarcated files. The difference between them is: one formatted files in qtemp (pgm a), while the second one formats files in any library other than qtemp (pgm b). I called 2 programs separately in 90 format, files with approximately 8 million records, both program consumes over 1300 CPU time, while PGM A is used to reduce CPU time from PGP to 5% Is about. I have tried many times and the result is similar. Do I know why CPYTOIMPF is faster than qtemp second library, though there is a slight difference? QTEMP and its contents are not required to survive more than the job life, Do not do things on the disc or it can be customized to reduce often, and the file changes can not be required to create file system transactions, because if the system becomes unchecked, QTEMP just blow away with the job In addition to this, QTEMP is protected There is

flex - Checking if Browser is using Cached SWC/SWF? -

How do you know that the browser is actually using cached SSF / Library for Flex projects? I want to be able to do things different from the preloader whether the user has never downloaded the library or not. He has already cached it by his browser. Is this possible? I am not aware of any standard way to do this. You can declare a public static statute VERSION_ID: string in a main code and change its value in each build. Now if you pass the latest version ID using the html query parameter in the preloader, you can read it in the preloader and then compare this version ID with the version ID of the loaded SWF. If they do not match, then you have a cached version. You can prevent preloader SWF from caching by adding a random number to the SWF URL. & lt; Embed src = "preloader SWF? Version id = 10 & amp; amp; & lt ;? php echo" rand = ". Rand (1, 10000)." \ ""? & Gt;

c# - How can i change excel cell value -

I am exporting Excel data from Gridview. It is my exported column: The key to posting is 50 50 but the column looks like this in Gridview: POSTING KEY 01 50 50 After export, Excel converts my string value to numerical form. But I would like to see "01" how can I change the Excel cell type or cell value before I save the file? From Excel, highlight column or cell, right click and under the "Number" tab, Select "Format Room", click on "Custom" under category. In the Type: Key in the textbox, "00"

c# - Show the window form modally on the other form -

I have a window form named form1 and I show the second window form of the name on it I want to form 2 modally so that the user can not click on anything else until the form2 shutdown, but the user will only see the text box displayed on form1 Can choose. I think if you use textbox on Form 2 and use it in Form 2 , Then it would be better form1

c# - Generic method using linq expressions -

मेरे पास अगले 2 तरीके हैं सार्वजनिक स्थिर स्ट्रिंग [] Method1 (CustomObj सह) {नई स्ट्रिंग लौटें] [सह.एक्स, सह.आई}; } सार्वजनिक स्थिर स्ट्रिंग [] [] Method2 (IQueryable & lt; CustomObj & gt; cos) {string [] [] s = नया स्ट्रिंग [cos.Count ()] []; Int i = 0; फॉरचा (कॉर में विभिन्न सह) (एससेटसेट (विधि 1 (सह), आई); i ++; } वापसी एस; } मैं Method2 के बजाय एक सामान्य विधि बनाना चाहता हूं, कुछ स्थिर स्ट्रिंग की तरह [] [] Method2 (यह IQuerable, string method1Name) कोई भी युक्तियां? धन्यवाद। आप क्या चाहते हैं विधि 1 को एक प्रतिनिधि के रूप में उपयोग कर रहा है। < कोड> सार्वजनिक प्रतिनिधि स्ट्रिंग [] मायडीलेगेट & lt; T & gt; (टी ओबीजे); सार्वजनिक स्थिर स्ट्रिंग Method2 & lt; T & gt; (यह IQueryAble & lt; T & gt; cos, MyDelegate & lt; T & gt; function1) {string [] [] s = नया स्ट्रिंग [cos.Count ()] []; Int i = 0; फॉरचाच (कॉरपोरेट में अलग-अलग) (एसएसेट वैल्यू (फंक्शन 1 (सह), आई); i ++; }}

c# - How to change time in datetime? -

How do I change time alone in the dateTime variable? date time = a few days' time; I need a change in time only in s . You can not change the datetime value - it is irreversible, however, you have to keep the variable can change. To change only time, the easiest way to do this is to create a timepane with relevant time, and use the DateTime.Date property: DateTime s = ...; Timespain TS = new timespan (10, 30, 0); S = s.Date + ts; s will now be a single date, but at 10.30 Note that date of time ignore daylight saving time saving, representing "inexperienced" Gregorian times in both directions (see comments section) only The exception is . Now and . Today : They retrieve the current system time, which reflects these events as they are. It's like something that inspired me to start the project, which is now ready to produce. Its ZonedDateTime type is "aware".

mysql - Deleting rows cause lock timeout -

When I try to delete rows from the table, I get these errors. The special case here is that I can run 5 processes at the same time. The table itself is an Inodb table with ~ 4.5 million rows. I do not have an index on the column used in the WHERE clause. I This is being done within transition, before I delete the record, then include the changes in the records, and only if all If the records are included, the transaction should be reduced. Error message: query error: lock waiting timeout; Try restarting the transaction while executing Tablename WHERE column = value from WTT Will it help to create an index on the referenced column? Should I explicitly lock the rows? I have got some additional information in the question but I do not think that it covers my situation completely. Is it certain that this is the DELETE statement that is causing the error, or can there be another statement in this query? DELETE statement is first, so it sounds logical but I'm not sur

How does Casting work in PHP? -

This does not work: (int) 08 == (int) 09 == 0 But does it more? (int) 07 == 7 (int) 06 = 6 6 <08 is in octal base (because it starts with 0), so it is invalid. .

c# - GroupPrincipal.Members.Remove() doesn't work with a large AD group -

I am using namespace classes to manage membership of several groups. These groups control the population of our print accounting system and some of them are very big I am running into a problem to remove any user from any of these groups. I have a test program that shows the problem. Note that the group I am testing is not nested, but user.IsMemberOf () also has the same problem, while GetAuthorizationGroups () correctly shows groups that The user is a member of the user, about the members of the 81 in the question group, which is not working (), and generally should have been about 65 or so. I would be interested in hearing from others who had this problem and they resolved it, I have found an open case with Microsoft, but the call is slow on the slower because the call center is 17 hours The time difference is, before I usually do not come to work for about an hour to leave the house. Using ({var group = GroupPrincipal.FindByIdentity (context, groupName)) by using (var conte

c++ - Convert integer to array -

I want to convert an integer into an array, so that it looks like the following: < Pre> integer number = 123456; Int array [7]; With the result: array [0] = 1 array [1] = 2 ... array [6] = 6 Perhaps the better solution is to work back: 123456% 10 = 6 123456/10 = 12345 12345% 10 = 5 12345/10 = 1234

Automated deployment of mixed SSIS / DLL solution -

We are currently a developed solution using SSIS / C #. The SSIS package (among other things) has a script function that uses logic developed in class libraries. This functionality needs to be different from the SSIS package. Because we are using an SSIS package, I understand that the requirement of compiled DLL is to be deployed in GAC, and then referred to by script work. However this is creating a deployment problem for us. Our automated deployment tool (properly) automatically increases version number of DLL, which is then published on GAC. Although it breaks the SSIS package, because it will try to use DLL based on the number of the version and will be published as the development machine GAC. The only solution we have is to modify the compiled DLL, Mannese SSIS package script work and then publish the package. It seems that there should be a better way of doing this - does anyone face this problem and come up with a better solution? Or is there something fundamental i

c++ - not2 stl negator -

एसटीएल का अध्ययन मैं ने एक मेटरको को नॉट टू 2 लेकिन एनकॉन्टर समस्याओं से नकारने की कोशिश की है। यहां एक उदाहरण है: #include & lt; iostream & gt; # शामिल करें & lt; vector & gt; #include & lt; कार्यात्मक & gt; # शामिल करें & lt; एल्गोरिथम & gt; नेमस्पेस एसटीडी का उपयोग करना; स्ट्रेट मैस्ट्रक्ट: बाइनरी_ फ़ंक्शन और लेफ्टिनेंट; इंट, इंट, बॉल्स एंड जी; {बूल ऑपरेटर () (इंट आई, एंट जे) {रिटर्न आई & lt; j; }}; टेम्पलेट & lt; कक्षा T & gt; वर्ग जनरेटर {सार्वजनिक: जनरेटर (टी प्रारंभ = 0, टी एसटीपी = 1): चालू (प्रारंभ), चरण (एसटीपी) {} टी ऑपरेटर () () {वर्तमान चालू = कदम; } निजी: टी चालू; टी कदम; }; Int main () {वेक्टर & lt; int & gt; पहले (10); उत्पन्न (प्रथम.बेजिन (), पहले.एंड (), जेनरेटोर & lt; int & gt; (10,10)); Cout & lt; & lt; "सबसे छोटा तत्व" & lt; & lt; * Min_element (प्रथम.बीजिन (), पहले.एंड (), माइस्ट्रक्ट ()) & lt; & lt; endl; Cout & lt; & lt; "सबसे छोटा तत्व:" &

c# - Popups in WPF immediately lose focus and close -

I'm hitting my head against a WPF popup issue, and hoping someone can help me :) Like this framework: Our app stores a list of UIObjects - These represent elements that are displayed in a viewport 3D (via the member user object, There is a flat, square mesh with bitmap) and tree view (Member Tree Via Through Aitim). In any case, when the object detects the right click, then it tries to open the popup, the code can be forwarded directly to: ContextMenu contextMenu = new ContextMenu (); // Add to the context of content menu.IsOpen = true; When I click in the viewport, everything works as expected - popup opens, and remains open until it does not lose focus or does not make any selection goes. In the tree view, however, popup reduces focus and closes immediately. I have tried to set the focus, to clearly set the placement target, after marking the event before the call, and after that the popup, the pop-up "Stage Open" And marking as a dozen other things, and

authentication - Auto login user to third party site without showing a password to him -

background We are unifying third party email solutions in our site. When a user goes to the Mail page, then it must be automatically authenticated on the mail site. For now, our page has mail link points which automatically submits a form with the user's login and password by clicking Submit After the user is redirected to the mail site with the certification cookie. The problem with this approach is that we do not want the user to see their mail password, because we automatically generate it for ourselves and some prudent reasons to show it Are not for Question Is there a way to get mail authentication cookies without sending the login information to the client and doing the form.submit operation from the client's browser Are you Is there a better way to do this, what am I trying to do? Edit Of course "I'm trying to programmatize it". It seems that the client does not have any valid solution except these logins / passwords. It seem

c++ - Workarounds for the forward-declared class enumeration problem? -

I am maintaining a large code base and using a combination of further announcements and PIMPL phrases so that time Reduce the compilation and reduce the reliance (and it actually works well), I have problems with those sections that contain public enumeration, these enumeration should not be forwarded. So, to include class headers No option has been left. For example: // Foo.h square fu {public: anonym type {TYPE_A, TYPE_B,}; ...}; // Bar.h #include "Foo.h" // Foo :: type for class bar {public: zero some function (Foo :: type type); ...}; So, I'm looking for ways to avoid it and only think about the following: The numbers of the class are different Type namespace // FooTypes.h name spaces FooTypes {enum type {TYPE_A, TYPE_B,}; } // Bar.h # included "FooTypes.h" class bar {public: zero some functions (FooTypes :: type type); ...}; Use int instead of computation // Bar.h class bar {public: some functions (int type ); ...}; What am I m

java - Observer Design Pattern -

Observer Design Pattern , the topic notifies all observers by calling update () A method of conducting each supervisor notify zero () (for (supervisor: supervisors) {observer.update (this);}} But the problem here is that each supervisor is updated in the sequence and the update operation is not called for the supervisor. Not all supervisors are updated unless a supervisor has an infinite loop for the update, then all supervisors after that will not be notified. < P> Question: Is there any way to solve this problem? If so, would that be a good example? The classic design pattern does not include similarity and threading. For the observers, it is necessary to create N threads. However be careful, because it needs to secure their thread safely.

correctness - How to write correct code at the first time? -

I usually make many mistakes (logic errors, syntax errors) in the first attempt before completing some programming tasks. I have to write unit test to find those bugs. This is especially problematic when I am in an interview, in that situation, I am under pressure and I can not test my code with the compiler and the unit test. My question is: How can I write the correct code in the first place? I know that it is difficult for the first time to have any practical approach to reducing bugs? Thank you all. I wanted to write a function that receives an integer array and an indicator for the size of the array. Fill that array with the principal number. This is not difficult at all, but I made many mistakes for the first time and continue searching for new bugs. Since it was a phone interview so I was asked to type the answer and send it the thought mail. My first attempt Zero prime (int * array, int size) {bool isPrime = true; For (int i = 0; i Writing code in Gmail w

.net - C# multi method attached to event, how to handle return value? -

यह कॉल है: bool isValid = true; अगर (this.ExternalConstraint! = नल) {isValid है और = this.ExternalConstraint (यह, EventArgs.Empty); } अगर (isValid) {// ...} इवेंट की तरह दिखें: सार्वजनिक प्रतिनिधि बूल बाहरी कंटेंट (ऑब्जेक्ट प्रेषक, इवेंटआर्ग्स आर्ग्स); घटना बाहरी संयम ExternalConstraint; डीबगिंग करते समय मैंने देखा कि घटना से जुड़े सभी पद्धति को बुलाया जाता है लेकिन केवल अंतिम वापसी इस रेखा पर वापस आती है: isValid और amp; = this.ExternalConstraint (यह, EventArgs .Empty); । निर्णय लेने के लिए मैं हर पद्धति को वापस कैसे लौटा सकता हूं या सभी वापसी मूल्य को संभालने के लिए घटना कैसे प्राप्त करूं? ईवेंट का उपयोग करते समय वापसी मूल्यों पर निर्भर रहने के लिए यह बुरा व्यवहार माना जाता है इसके बजाय, आपको परिणाम प्राप्त करने के लिए उपयोगकर्ता-निर्धारित EventArgs का उपयोग करना चाहिए। सार्वजनिक वर्ग ConstraintEventArgs: EventArgs {public bool ISValid {get; सेट; }} कुछ तंत्र का कार्यान्वयन भी महत्वपूर्ण है जिसमें एकाधिक ईवेंट श्रोताओं एक दूसरे के मूल्यों को ओवरराइड नहीं

Philosophical Design Questions for OOP-Tetris -

You are writing a Tetris program in Java. Regarding the following aspects, how do you set up your class design? Piece Class: An piece of an internal array that determines the size of the piece, vs. seven piece Squares, one for each piece, they are all sub-squares of a normal Paes class. Piece Class Representation: Create an array of 4 examples of a <4> block , represent a square of one piece, and each < It has its place on the board in the code> block (in the graphical coordinates) vs. 4x4 array where null means that there is no block there, and the location is determined Location: In the block the block or on the board code> arrays make its place versus. Know the locations of the piece and boards to the blocks which include them. Generating a piece: is a static method of the grinding class getRandomPiece , or a PieceFactory , on which you Create an example Zenerlandam Method method Regulating the current piece: Use the e

casting - Is it possible to block/deny a cast conversion in Java? -

I have a simple game code, where an agent interface should be applied to create an agent controller In the letter gamestate is a class game game that is the gamestate interface, and it can be passed to the implementing object agent, so the agent can read and analyze the data from the game state, and the appropriate action of the agent (the form of an intern Return) Ahia agent should. This agent is the agent that should implement agents: Public interface AgentInterface {// Return value joystick Specifies the direction of the public int verb GameStat Interface GS); } Playing the game with an agent named MyAgent: GameState gs = new GameState (); Agent interface agent = New MyAgent (); While (true) {// more code here int best action = agent.action (gs) // more code here} However, there is some information in the gameState that the agent should not be Able to enter, because it will be deceptive to the controller, but the gamestate interface will allow the agent to obtain i

Google Maps GOverviewMapControl() and GAdsManager -

I have a GMap2 object with GOverviewMapControl and a GAdsManager, but they both appear in the lower right hand corner. How can I see them in different parts of the map? Here's my overview: map.addControl (new GLargeMapControl ()); Map.addControl (new GMapTypeControl ()); Map.addControl (new GOverviewMapControl ()); Map.enableDoubleClickZoom (); My ad here var adsManagerOptions = {maxAdsOnMap: 2, Style: 'adunit', channel: 'XXXXXXXXX'}; AdsManager = New GAdsManager (Map, Publisher ID, adsManagerOptions); AdsManager.enable (); will allow you to determine the status of GADSManager. The options are passed in the GAdsManager constructor. Unfortunately, this is not flexible according to the documentation, "Unlike other controls, you can only keep this control in the bottom right corner of the map (G_ANCHOR_BOTTOM_RIGHT)." I do not have any way to test at this time, but your options might look like this: var adsManagerOptions = {maxAd

java - Can I use a Comparator without implementing Comparable? -

Is it possible to use comparative without applying a comparative range? For example, if I had the following: MyClass {Comparator comp; Ordered List Inheritance (Compare C) {this.comp = c; }} Can I then use Comp to compare two objects? If so, how would I do this? Thank you ... You do not use you use. Comparative is an interface implemented by the object to specify its order sequence with another type of object. Comparator is a common interface that only takes two objects and tells you their sort order. You can do this: Public class students {Private Final IND; Name of private final string; Private finals end age; Public student (int id, string name, int era) {this.id = id; This.name = name; This.age = age; } Public int getId () {return ID; } Public string getName () {return name; } Public int getAge () {return age; }} With : Public Classes Age Compaq Tools Companator & lt; Students & gt; {Comparison of Public Entry (Student S1, Student S2) {if (s

php - get variable from one page -

I'm a newbie also my language is bad, and to say in the pursuit of a solution for your learning php code I have many pages i.e. etc. Page 1.php ... page 1001.php Each page is probably: inside page 1.php: $ color = "red"; $ Pages = "two"; $ Theme = "ocean"; $ Lang = "eng"; $ Letterset = "ISO-8859-1"; Etc. (and ..) inside page2.php: $ color = "blue"; $ Pages = "two"; $ Theme = "ocean"; $ Lang = "this"; $ Charset = "UTF-8"; Etc. (and ..) Now I have to put the variable of each page on one page, n to add a simple code to each page and edit it for the next time easily I'm using plain text (flat file) Does anyone help me? I appreciate and say thanks You can try to use "included" < / P>

mysql - Best practices, PHP, tracking millions of impressions per day -

What else do I have to do to insert 20k mysql (During the peak hour around 1k / sec during slow time )? I am doing some research and I wrote "INSERT DELAYED" suggestion in a flat file, "FOPAN (file, 'A)', and then running a chain job to dump" essential "data to mysql, etc. . I have heard that you need many servers and "load balancers" which I have never heard of, to do something like this work. I'm looking at these "cloud server" things - one-ma-jigs, and their automatic scalability, but not really about scalable. The app is just a tracker script, so if I have 100 websites that load 3 million pages daily, there will be 300 million inserts in a day. The data will be taken through a script which will run for every 15-30 minutes which will make the data normal and put it in any other MySQL table. What do the big dogs do? What do small dogs do? I can not take a big server anymore, so any intuitive way, if there are many ways

What common application types are created with Visual C++? -

C # and VB Net (high level languages) is good for n-level business applications and so on. I get C ++ very interesting language and spend more time developing it. What kinds of applications are better suited for C ++ applications? Do many windows create applications (for example) created using C ++? C ++ is most suitable for system programming. For example, in addition to creating window services, traditionally there is a language of choice for writing high-performance code such as 3G graphics or scientific applications. In general, compared to the C ++ framework (MFCs, etc.), the graphical applications are hard to create, modern options such as WPF and Windows Forms.

sql - Alter column's default value -

I have a table with one column 'CompanyID int not null' and its default value is set to 10. Now I want to write a query that will change this default value to 1. How can I do this? Any help would be appreciated. I am using SQL Server 2000. I think that you can do whatever you can, and make it again: go to the table dbo.YourTable drop barrier default_value_name_constraint table dbo.yourTable add constraint default_value_name_constraint go to YourValueName for the default column

javascript - Jquery resizeable issue -

I'm also trying to use the Rhesus option. This works when I write it: $ (obj). Revised ({minHyight: 150, minWidth: 280, also resize: '.tab_content'}); But the problem is that all the 'tab_content' elements are resizing in the page, I want to be relative to 'obj' which includes 'tab_content', I tried: Also Resize: $ ('. Tab_content', obj) but this did not work, any suggestions, thanks I have not previously been resizable, but I will try to do something like this: $ (obj) .resizable ({minHyight: 150, MinWidth: 280, Also Resize: $ (this). Chche ( '. Tab_content')});

Html: play audio without controls? -

I need to run the MP3 audio file, when the user clicks on the image. I only want audio to play, i.e. no control, widgets etc. Neither browser nor an external application should be launched. Edit: OK, I might be able to exclude Flash. Recommendations for lightweight Flash Player? You can: Lt; Embed src = "blah.wav" autostart = false loop = false & gt; ... but it's bad to play sound instead of flash and some browsers will also come with a cross browser. You can also use HTML5 and tags: ... but it will not be supported by all browsers. EDIT: You can use a Flash Player or ... there are tons! Try the examples and see what is best for you.

Flash Actionscript -

This is my first time for an action code for Flash. I want to write a flash clip which acts as the guardian of another flash clip. I want to write the function in the original flash, and call that function in the hair flash clip. For example, I want to create an episode that sends the game score "submitscore.php" Parents are just a controller and the child is my game. I want to send the game score to the controller, then send it to my php file. Do you have any sample code or something to do? I really do not know what I want to be difficult or easy because it is my first time;) thanx than before Var game: object; Send private functionPHP (E: CustomEvent): zero {var score: number = escor; // send it} // Load the game .SWF var ldr: loader = new loader (); AddChild; Ldr.contentLoaderInfo.addEventListener (event.complete, onload); Ldr.load (new URLRequest ("Game.swf")); Private Function Onload (E: Event): Zero {game = LoaderInfo (e.target). material; Game.addEven

Reverse CreateObject in VBScript -

I have an old vbscript that runs the command, foo = CreateObject (x.y). I want to run this script on another computer (which it does not run on BTW now), but I do not know which DLL should register me, or what I should do, to run the CreateObject command. How can I find out what is needed to make a copy in a new computer, and I need to register them, and what should be done? Or maybe they are osx or something else? > Cheers You may type your HKEY_CLASSES_ROOT \ Xy \ CLSID key. With that {GUID} , go to HKEY_CLASSES_ROOT \ CLSID \ {GUID} \ InprocServer32 key

internationalization - Crowdsourced Translation -

I once saw a free translation management software used to publish original software texts and translate other languages ​​into an affiliate The way was to allow the route Something similar but the community has been allowed to have additional translations. I can not find it again, so I was thinking that someone knows it? Cheers One such solution.

Excel 2003 (8316.8221) screen corruption -

एक्सेल 2003 (11.8316.8221) SP3 Windows XP पर - KB973475 जब मेरा एक्सेल VBA अनुप्रयोग शुरू होता है यह कार्यपुस्तिका में पहली शीट को सक्रिय करता है, लेकिन पहली शीट में दूसरी और तीसरी शीट "खून बह रहा" के भाग को दर्शाता है। इसे आसानी से कार्यपुस्तिका को कम करने और अधिकतम करने के बारे में बताकर काम किया जा सकता है या इसे किसी अन्य तरीके से दोबारा रंगाने के लिए किया जा सकता है। पेंट करने के बाद पहली शीट पूरी तरह से पूर्ण रूप से दिखाती है। क) क्या एक्सेल को अपडेट किया गया है जो इस समस्या को हल करता है? बी) क्या आप एक अच्छे परिपाटी के बारे में सोच सकते हैं (विवरण नीचे दिया गया है)? कार्यपुस्तिका एक वीबीए एप्लीकेशन है, जिसने कई सालों से अच्छी तरह से काम किया है। अक्टूबर के मध्य में Excel के अपडेट के बाद से ऊपर वर्णित के रूप में यह टूट गया है टूटी बिल्ड 11.8316.8221 एसपी 3 है। कार्यपुस्तिका खुली हुई घटना में कई शीट असुरक्षित हैं और फिर संरक्षित (आरेखण वस्तुओं और परिदृश्यों के लिए)। यदि इस कार्यक्षमता की टिप्पणी की जाती है तो समस्या दूर हो जाती है। यह व्यवहार घटिया लग रहा है