instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have an event table with following columns: sequence (int) DeviceID (varchar(8)) time_start (datetime) DeviceState (smallint) time_end (datetime) All columns except time_end are populated with the data (my current time_end column is NULL through out the table). What I'd need to do is to populate the time_end column...
stackexchange/codereview
Is there a general way to convert between a measure of similarity and a measure of distance? Consider a similarity measure like the number of 2-grams that two strings have in common. 2-grams('beta', 'delta') = 1 2-grams('apple', 'dappled') = 4 What if I need to feed this to an optimization algorithm that expects a mea...
stackexchange/codereview
What does "compare two strings lexicographically" mean?
stackexchange/codereview
I have an Internet Explorer add-in, written in C#, which talks via a WCF named-pipe to a .NET desktop application. The desktop app creates the ServiceHost for the netNamedPipeBinding, and each instance of the IE add-in creates a ChannelFactory to talk to the app. Everything works fine under Windows XP, but an excepti...
stackexchange/codereview
I am loading in the following navbar html from a required PHP file: <ul id="navlist"> <li id="active"><a href="#" id="current">Home</a></li> <li><a href="about.php">About</a></li> <li><a href="news.php">News</a></li> <li><a href="applying.php">Applying</a></li> <li><a href="c...
stackexchange/codereview
This is related to an earlier question I had asked about what sort of middleware one can use for developing a client/server app. Among the options suggested, I was intrigued by zeroMQ and its capabilities. Since morning, I have been researching on using zeroMQ for my application. However, since my client is a Adobe AI...
stackexchange/codereview
I need to change, using applescript, the listbox "region", in the system preferences|language & text section. I can't access this listbox - see code below. tell application "System Preferences" activate get the name of every pane of application "System Preferences" set the current pane to pane id "com.apple...
stackexchange/codereview
The main scrolling commands in Vim are: Ctrl-B and Ctrl-F, as well as PageUp and PageDown scroll by full page Ctrl-U and Ctrl-D scroll half a page by default Ctrl-Y and Ctrl-E scroll one line I lose visual context every time for the former two, so I have developed the bad habit of hitting the latter (Ctrl-Y and...
stackexchange/codereview
I have a node type on my Drupal site that uses a Flag to let users "unpublish" or "publish" their content. This is not the same as Drupal's node publishing... that is still reserved for admins of the site. Instead, the Flag is used to determine if the node shows up in other Views. I've also created an "admin" type page...
stackexchange/codereview
In C# how does a declaration differ from a definition, i.e.: A class declaration vs a class definition A variable declaration vs definition A method parameter declaration vs definition In C++, this was rather obvious, but in C# from what I can tell from the ECMA standard and MSDN is that everything is a declaration a...
stackexchange/codereview
This is what I'm trying to achieve https://i.stack.imgur.com/e9xZa.jpg I tried this jsfiddle.net/RUSm3/ but as you can see the date overlaps on the image. So I added left:215px for the date jsfiddle.net/9aw29/ It looks good but perhaps I don't have an image. How can I get the date back to the far left? I'm trying to ...
stackexchange/codereview
Is there any way to use placeholder similar to WebForms in NVelocity View Engine (.vm files)? Today I've got a component containing everything for the <head>, but I wish to specify additional tags from each view page like it can easily be done in ASP.NET WebForms / MVC: <asp:Content ID="Content2" ContentPlaceHolderID=...
stackexchange/codereview
I would like to do something like NameOfTheMethod(parameters){ // Code... } There's using, foreach, for, etc. that are already built-in, but I don't know if creating something similar is even possible. Is it? The reason why I ask this is because sometimes that there are many different pieces of code that are wrapped...
stackexchange/codereview
Why does the code below not cause the <table> to be vertically-aligned in the middle of the <div>? <div style="width: 850px; height: 470px;vertical-align: middle;" align="center"> <table style="padding-left: 20px; width: 700px; border: 10px groove #0033CC; background-color: #F9F9F9;"> <tr> ...
stackexchange/codereview
I'm havin trouble storing an array of data. Below is the code use in the web application to check to see if the data is there, and if it's there serve it, else, cache it then serve it. I am using MySQLi $id = $db->real_escape_string($_GET['id']); $key = 'content_' . $app; $data = apc_fetch($key); if (!is_array($data))...
stackexchange/codereview
I want to use/create a button that works like the one on the (HTC Desire) Soft Keyboard. So that when you make a long click, it will show a list of options, and by sliding your finger to the left or right, you select which option you want to choose. Example: When I hold down the "12#" button on the keyboard, it presen...
stackexchange/codereview
I'm trying to create a comic book reader using JavaScript where the content of the gallery is dynamically generated from the images in a given directory (directory is chosen with a bit of PHP). I want to display two pages (images) at a time so the comic is read like it would be in a book format. Users are then able to ...
stackexchange/codereview
As almost every programmer, I'm writing my own PHP framework for educational purposes. And now I'm looking at the problem with parsing URLs for MVC routing. Framework will use friendly URLs everywhere. But the question is how to parse them in front controller. For example the link /foo/bar/aaa/bbb may mean "Call the co...
stackexchange/codereview
$('#nav a').click(function () { $('#nav a').removeClass('current'); $(this).addClass('current'); return false; }); My HTML is: <ul id="nav"> <li><a class="current hoc" href="#spread1-anchor">Home</a> /</li> <li><a class="bgc" href="#spread2-anchor">Background</a> /</li> <li><a class="apc" href="#sp...
stackexchange/codereview
Apparently I mistyped my email a long time ago, whenever I was setting up git, and so my email has been incorrect in many repositories (I typed a 0 instead of an o). I sign all of my commits, so in almost every commit in every repo for years it's said signed off by: <xxx0@foo.bar> instead of signed off by: <xxxo@foo.ba...
stackexchange/codereview
I wanted to combine app_themes css files into one on the fly. I did so using Mads Cristensen technique. But now all elements that has background image defined through css (see picture) don't display image. . I believe that is because css files are not relatively referenced anymore (../), but through axd file. I'm tryi...
stackexchange/codereview
I am a bit confused. I have an ARGB bitmap into an unsigned char* array and I just want to iterate the array to check if pixels are black or white. Can anyone post me a sample code for this? To get the array I am using this methods. CGContextRef CreateARGBBitmapContext (CGSize size) { CGColorSpaceRef colorSpace = ...
stackexchange/codereview
I wanna use an image viewer control in silverlight with feature zoom in/out the image, I found "MultiScaleImage" control that accept source as Xml file, which is can be created by "Deep Zoom Composer" program (install this program: import the images then expose and export: the program will generate the images and the "...
stackexchange/codereview
I have never worked with json before. I am trying: http://api.worldbank.org//topics?format=JSON and make things with it, but I don't even know how to get started. Following some manuals, I did this: import urllib import urllib2 import simplejson urlb = 'http://api.worldbank.org/topics' datab = urllib2.urlopen(urlb+'?'+...
stackexchange/codereview
I have a standard comment_id/comment_parent_id setup on my mysql comments table (with a created timestamp). My question is what is the least process intensive query to get all NEW replies on a user's comment? Just like with the commenting systems that use a checkbox to email replies to your comment? Do you cookie a ti...
stackexchange/codereview
Im doing a textarea with jeditable. The content is saved and loaded from a database. But im having some problems in the way IE and FF handles linebreaks differently. After some debugging i've found a mysterious behavior in FF. For example if i input in textarea: 1 2 It will return 1<br>2 Which is fine. But if i write...
stackexchange/codereview
I'm starting to build a script for a Penny Auction site like swoopo.com What framework should I use? Whats the best way to keep the timers updated without using too much bandwidth? This all started when I started looking at all the junk thats currently out there. Most are using PHP and javascript and I feel there is a ...
stackexchange/codereview
i want to protect my website form xss, and i want to assure that all my data are correct and consistent, so i don't want to allow to add any scripts to my db, that's because my data may be used by other web services , so i want to be sure that my data is correct and will not cause any problems to others. I want to make...
stackexchange/codereview
I have a table with some nested tables ( this is outputted but a dotnet control i cant do anything about ) What i want is to move all the rows that are a direct child but so far its not working as I thought it would. I have a basic setup that just takes all the rows, also the ones from the nested tables, I commented o...
stackexchange/codereview
I want to give my content slider the ability to respond to keypress (LEFT ARROW key and RIGHT ARROW key) feature. I have read about some conflicts between several browsers and operation systems. The user can navigate the content while he is on the global website (body). Pseudo Code: ON Global Document IF Key Press LE...
stackexchange/codereview
I want be able to send a list of friends & recent additions from someones facebook account to an email address daily or weekly. Looking up online, I think the best approach would be to setup a website, where a user would facebook connect with their facebook credentials & accept all terms including accessing their frien...
stackexchange/codereview
I'm using Firefox. Is there something out there that will show me all the JavaScript events that are getting triggered in real time?
stackexchange/codereview
I'm attempting to develop a new website using the Processsingjs library. It works fine in Chrome, but the canvas is showing up blank in Firefox. I can view processingjs.org just fine through the same install of firefox, just not my website. The code is bare bones: <!-- index.html --> <script src="includes\processin...
stackexchange/codereview
I'm using dirname from libgen.h to get the directory path from a filename's path. This is it's signature: char * dirname (char *path) When compiling on a 32 bit machine or using -m32 with gcc, it all works fine. My code looks like this: char* path = "/path/to/my/file.txt"; char* path_cpy = strdup(path); const char* di...
stackexchange/codereview
I've done a QT (4.6.3) program/GUI that loads plugins in real time and this works wonderfully. Now I've just created a new plugin that differs from all the others because it has a .ui file as it should show a Dialog GUI when executed. Well, it cannot be instantiated by the plugin loader. I've already tried to comment o...
stackexchange/codereview
I have this code on my android: try { http = (HttpConnection) Connector.open("http://35.9.22.102:8080/Services/SubmitMedia/"); http.setRequestMethod(HttpConnection.POST); http.setRequestProperty("Connection", "keep-alive"); http.setRequestProperty("Content-Type", "multipart/form-data"); http.setRequ...
stackexchange/codereview
Hi I have some codes that need to run for 1 time for a request. I have a BaseController which all controllers derived from. I write my code to BaseController onActionExecuting method but it is not good because for every action execution code is running. I can prenvent it with a basic if clause but i dont want to use it...
stackexchange/codereview
i try to build an autosubmit with the Jquery Form Plugin. for example $("#my_form").change(function(){ document.my_up_form.submit(); }); The file upload and everything works but i get a page reload. I dont understand that. When use the normal submit button it works (no page reload). Can somebody tell me ...
stackexchange/codereview
I'm writing a console based program for my coursework, and am wondering how best to structure it so that it is both stable and efficient. I currently have #include <iostream> #include <cstdlib> using namespace std; int main() { int choice; do { cout << "\E[H\E[2J" // Clear the console ...
stackexchange/codereview
I have a function getStatus() that returns an associative array. Right now I'm accessing a value with two commands: $a = $user->getStatus(); $a = $a['keyName']; doSomething($a); Is there a way to rephrase that into one command like: doSomething($user->getStatus()['keyName']);
stackexchange/codereview
I have created a 'bottom-up' tree in my SQL database tables where each element has a column for a reference to its parent. Now I am trying to find out if there is an easy query to get all the parents of a child. For example: [ Parent #1 ] | [Pare...
stackexchange/codereview
RewriteRule ^teamstore/(.*)/$ /teamproduct.php?teamproduct=$1&products=true [NC,L] RewriteRule ^teamstore-(.*)/$ /teamproduct.php?teamproduct=$1&products=true [NC,L] Here's the situation. We've already had theese urls rewritten, but we want to change the formatting of these pages so they're separated by hyphen instea...
stackexchange/codereview
I need to implement a prioritised collection. Assuming we have the following three values in the collection (and their priorities): thisIsUrgent = Priority.High thisIsImportant = Priority.Medium thisIsBoring = Priority.Low I want to use MoveNext() to go through the collection to get another value. Assuming I'm looping...
stackexchange/codereview
I am coming up to speed on modifying an application built in EXT,and I would like to use an MVC pattern with the overall architecture. Could someone point out how I can load views dynamically in EXT? For instance, to make a blind call to a controller that will return some kind of view that could be html, a grid, a wind...
stackexchange/codereview
I know it maybe sounds a basic question but I'm having a hard time figuring this out. First of all I have this form: <h:form> <h:inputText value="#{movies.name}"/> <a4j:commandButton id="mybutton" value="Modify" immediate="true" action="#{movies.testModify}"/> </h:form> I want to catch the value from the input ...
stackexchange/codereview
I would like to extract two fields from a PNG file. Namely, the geometry field and one of the fields from the metadata. What is the fastest way I could go about doing this? I have benchmarked my script that currently performs this and by far the slowest action is executing the actual ImageMagick "identify" program on t...
stackexchange/codereview
Yesterday, I've downloaded and install the free trial version of WAS v7. The version I've downloaded is 7.0.0.9 but I need to certify my application against 7.0.0.3. Where can I get this version? UPDATED: It turns out that what I really needed was WebSphere Application Server for Developpers It's working!
stackexchange/codereview
I couldn't find the need of a generic class other than situations like collection of classes. Items like stack and linked list. I can see people use it in other places also. What do we gain using a generic class?
stackexchange/codereview
How can I center the map on my current location overlay. I have enableMyLocation(); and there is a blue dot. How can I center on the blue dot? The reason is that it takes a while to get GPS location from the Location Manager. So I have the blue location dot already displayed but still cannot move the map to my location...
stackexchange/codereview
Is there any way to insert an NSLocalizedString in interface builder. For example set a label text to a localized string instead of a static string? I really hate to create a property for every single item that requires a localized string.
stackexchange/codereview
I'm using httplib to access an api over https and need to build in exception handling in the event that the api is down. Here's an example connection: connection = httplib.HTTPSConnection('non-existent-api.com', timeout=1) connection.request('POST', '/request.api', xml, headers={'Content-Type': 'text/xml'}) response = ...
stackexchange/codereview
I'm writing a program which emails multiple people and it takes the addresses from a config file. The problem is that every time it runs it only takes to first address and sends it to that one. By the way this is using the configparser modual in python. heres my code: reporter_email = '%s' %config.get("email", "reporte...
stackexchange/codereview
For the past few years, I've been using WPF in a mixed-mode app to display various bits & pieces of UI. WPF is used by a C# assembly to generate the UI - it references a C++/CLI-built assembly that contains some native code. The native code makes no OS calls beyond a few printf's; it's purely computational. When runn...
stackexchange/codereview
I am after something exactly like this really... http://www.haggsgate.co.uk/contact/ A horizontal scrolling site controlled by two arrows, that only appear when they are needed, faded other times. But i dont really have a clue where to start. The addition is i need it to also add an active link to the navigation. For e...
stackexchange/codereview
Hey guys, I feel stupid with this one. I have one <div> that is set to some large width, spanning longer than the window view port and thus adding a horizontal scrollbar. Below that I have another <div>. This <div> has a simple image set as the background-image with repeat-x. I can't seem to get the second <div> to rep...
stackexchange/codereview
I have flex client application with php as a server and i want to implements domain user and password authentication. I'm sending the user and the password from the flex client through httpservice to php script and the php script authenticate the user and the password with the domain But! I want to encrypt the user's p...
stackexchange/codereview
I'm having problem in accessing the Tomcat6-admin web page, here's what I did: ########################################################################################################## root@ISUZU:/etc/tomcat6# cat tomcat-users.xml <?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> <rol...
stackexchange/codereview
I'm using a GridView and Details View and my datasource is a custom ObjectDataSource that returns a DataSet. This isn't a SQL server, I'm using an LDAP query to get users from Active Directory. I have two custom datasources in the ASPX page with one bound to the GridView and one to the DetailsView. They both have Sele...
stackexchange/codereview
I'd like to develop for Android but I don't really like using an IDE for programming as I find them to be pretty cumbersome compared to a text editor and command console. Is there any way I can develop for Android without doing so in Eclipse, and instead using Gedit? The system requirements specified on the Android dev...
stackexchange/codereview
Hi I am using vs2008 making an asp.net.vb app. The following stored procedure resolutely insists on returning an integer. I on the other hand was hoping for, and expecting, a single name to be returned. Can anyone help amend the sp or describe what I need to do to get the result I desire. ALTER PROCEDURE [dbo].[getus...
stackexchange/codereview
I've been testing sending and receiving broadcasts in my application but I have a problem. The service starts and I get the Toast to say the broadcast has been sent but onReceive is never called in the myMapView class. I've only included the code I think is relevant below... any help would be much appreciated. I don't ...
stackexchange/codereview
I have a wpf page with 5 button. All the 5 buttons must be of same size and all must have the same background image. How to do this? Regards, Karn
stackexchange/codereview
I am developing a web application that will require use of a MySQL database from within different scripts in both PHP and JavaScript. I'm used to the "standard" concept of connecting to the db mysql_connect("host", "username", "password") but I am wondering how to keep these strings away from prying eyes. My assumption...
stackexchange/codereview
How can I see which MFC (Microsoft Foundation Classes) Version an executable needs?
stackexchange/codereview
I am looking for the best way to implement user permissions to allow users to edit specific model instances. For instance, I have such two models: model RadioChannel(models.Model): name = models.CharField(max_length=150, unique= True) number = models.IntegerField( unique= True) model ProgramSchedule(models.Mod...
stackexchange/codereview
How can i put multiple data in one datagrid cell? For example, a user can be a member of different organisations. But i dont want the table to create a new datagrid row for the same user that is a member of multiple organisations. This is how the code looks like right now: Dim dSourceMemberOf As New SqlDataAdapter("QUE...
stackexchange/codereview
I'm doing an experiment with wxWebConnect test application, incorporating the xpcom tutorial at "http://nerdlife.net/building-a-c-xpcom-component-in-windows/" I adapt MyComponent class as necessary to compile together with testapp.exe (not as separate dll), and on MyApp::OnInit I have the following lines: ns_smartptr<n...
stackexchange/codereview
Sorry if there is already made such question earlier, but I have no time at the moment to dig in stackoverflow db ... So, I have this code: procedure TForm1.GraphPrevBtnMouseEnter(Sender: TObject); var frm_PrevBtn : TForm; begin GraphPrevBtn.Width := 75; if z = 0 then begin frm_PrevBtn := TForm.Create(nil); ...
stackexchange/codereview
In OO apps, it's common to have an Application class which holds your top-level managers or whatever. This makes it hard to avoid having a theApp global object, or using a Singleton or something. Does it matter? Should we seek to make this as OO as possible, or accept that OO principles break down sometimes?
stackexchange/codereview
I have an RCP product based on 2 features: my product feature and the org.eclipse.rcp feature. It worked perfectly at export time and at run time. Last week I decided to add the error log view to my product. I simply added the view to my "persective" and the logview plugin as plugin dependency in my main plugin. Just w...
stackexchange/codereview
I know that little things like whitespace at the beginning of the ror.xml file will throw errors, but how could opening the file in Dreamweaver, NOT CHANGING ANYTHING, and then uploading the file make it valid? Edit: I don't think it makes a difference but the language of script is PHP. The script does the following: ...
stackexchange/codereview
Im having trouble tring to figure out how to save dynamic radio buttons. I have a project where i have to use radiobuttons instead of checkboxes. Basically, there is a database table with "roles" in it ... i.e administrator, user, etc etc etc and these are updateable but the user. On a specific page, these get spit out...
stackexchange/codereview
module type ELEMENT = sig type element_i end module Element:ELEMENT = struct type element_i = N of int | CNN of cnn end module type SEMIRING = functor (E:ELEMENT)-> sig type elements end module Semiring:SEMIRING = functor(Element:ELEMENT) -> struct let zero = (Element.element_i 0) (*ERROR: Un...
stackexchange/codereview
The question is in two parts. The first is conceptual. The next looks at the same question more concretely in Scala. Does using only immutable data structures in a programming language make implementing certain algorithms/logic inherently more computationally expensive in practice? This draws to the fact that immutabi...
stackexchange/codereview
I want to have a scroll view, where you display 5 thumbnails on the scroll view each time. Basically it's a table with one row and in each row we have 5 thumbnails in it. You slide your finger to the right then you display the next set of 5 thumbnails. What do I need to do this?? Is it true that we need a scroll view...
stackexchange/codereview
Installing BlackBerry's JDE in Eclipse, via Help > Install New Software, it fails with this error: Cannot complete the install because one or more required items could not be found. Software being installed: BlackBerry Java Plug-in 1.1.2.201004161203-16 (net.rim.EclipseJDE.feature.group 1.1.2.201004161203-16) ...
stackexchange/codereview
I created a virtualenv, and while it has many system paths, it doesn't have others. Specifically, pyshared and dist-packages don't seem to be included. As a result, my system-wide MySQLdb and psycopg2 aren't available. Any ideas why?
stackexchange/codereview
I am trying to show a rails view file in a textarea. the view file contains a bunch of HTML, which I want to escape so that it does not interfere with on page html. here is an example: In this view we are going to display the contents of a partial <textarea> <%= html_escape render('partial') %> </textarea> and in pa...
stackexchange/codereview
I need to display an additonal custom attribute from a product on the Order Slip PDF so that our distributor can find the proper product id. We have 3 different types of SKUs being used; one is our own, the other is from our supplier and another is from the manufacturer. Which part of Magento do I have to change in ord...
stackexchange/codereview
I have a DataGrid which is as follows:: <wpfkit:DataGrid AutoGenerateColumns="False" ItemsSource="{Binding}" Width="Auto" FrozenColumnCount="2" SelectionMode="Extended" CanUserAddRows="False" x:Name="CommonPEGrid" Loaded="CommonPEGrid_Loaded"> <wpfkit:DataGrid.DataCo...
stackexchange/codereview
Im making a small experiment. In the old days, most people would save configuration files in a php file as a bunch of constants or a class with a loooot of attributes. Now, we see projects like symfony using yaml or something else. My question is: If you could can pick from three different ways to store your config fil...
stackexchange/codereview
Is it possible to dynamically add resource strings on the fly to resource files? What if the effort involves multiple languages?
stackexchange/codereview
I am using jQuery beauty tips (which is also using hoverIntent plugin) and I would like to display an href link inside the tooltip text and allow the user to click on the link. However, as soon as we leave the anchor, the toottip text disappears after some timeout (that we can define) So I would like to keep the the t...
stackexchange/codereview
I'm looking for a way to create a site with tabbed navigation with an image background that "bleeds through" the main div into the active tab. I made a little ASCII artwork to describe this: +-----------+-----------+-----------+ |/ / Tab 1 /| ! !Tab 2! | & &Tab 3& | | / / / / / +-----------+-----------+---------------...
stackexchange/codereview
I'm writing a lot of code in javascript lately and I'm using Prototype.js to help with a lot of the boilerplate, just the bind method is more than worth it since I like using closures instead of objects to do the heavy lifting. It's hard to give up habits picked up from using ruby blocks. So here's my question: Is ther...
stackexchange/codereview
when server responses with header Set-Cookie: ADS=SN=175A21EF. What does it mean? Do i have to save one cookie with name ADS containing data SN=175A21EF or are there two cookies ADS and SN containing data 175A21EF? Thx for reply
stackexchange/codereview
I have a listbox representing a SQL WHERE statement and the items inside can be grouped. For example, a user can have the following items in their ListBox I would like to show the AND/OR value only if the ListBox item is not the first item in the listbox or a group (like example). I am currently using a MultiConverte...
stackexchange/codereview
Is there a particular name for <% and %>.
stackexchange/codereview
Im wondering if theres anyway of adding a free item to the cart when someone spends over £50 in magento. Thanks
stackexchange/codereview
I built a document upload admin screen, where my client can browse and upload pdf documents to a mysql dbase. I have two separate tables for the Agendas, and one for Minutes. both have separate table names "upload" and "upload_mins". on the index.php page, I have the page fetch each row of the database, and display ...
stackexchange/codereview
A Rec object has a member variable called tag which is a String. If I have a List of Recs, how could I de-dupe the list based on the tag member variable? I just need to make sure that the List contains only one Rec with each tag value. Something like the following, but I'm not sure what's the best algorithm to keep tra...
stackexchange/codereview
With Linq to Entities, I am trying to query a Log table to find rows near a matching row. I am having trouble with adding a date inside the query. This is what I have so far. from l in objectSet.Logs let match = objectSet.Logs.Where(whatever).FirstOrDefault() where l.Timestamp > (match.Timestamp - twoHou...
stackexchange/codereview
What I am trying to do is once the AppWidget is removed from the homescreen of the user's Android phone, I want to stop the background service that Updates the AppWidget. Here is the code that I am using...don't understand whats wrong? @Override public void onDeleted(Context context, int[] appWidgetIds){ Intent servi...
stackexchange/codereview
Got a textbox in VBA and dont want the usser to be able to type spaces in it can i prevent the usser from doing this with programing?
stackexchange/codereview
A lot of my node.js processes are crashing with the ECONNRESET error. Here's the output I can see: node.js:50 throw e; ^ Error: ECONNRESET, Connection reset by peer at Client._readImpl (net:320:14) at IOWatcher.callback (net:470:24) at node.js:607:9 Does anyone know how to handle this? It's not a v...
stackexchange/codereview
I have a JFrame with the JDesktopPane and inside the JDesktopPane, I launch with the constructor a JInternalFrame. (Its a app like the authentification users, with the textbox user and textbox pass) I lauch the internal like this: MyInternalFrame internalF = new MyInternalFrame(); desktopPane.add(internalF); I try wi...
stackexchange/codereview
Never mind why I'm doing this -- this is mainly theoretical. If I were MD5 hashing string representations of integers, how high would I have to count before two of the hashes collide?
stackexchange/codereview
I have tried adding a bookmark on the home screen manually. Need some help on doing it programatically. Thanks.
stackexchange/codereview
I have a function that returns a tuple made up of two objects of the same class. class MyClass { public int i; public char c; }; Now, I have a function that returns IEnumerable public IEnumerable<Tuple<MyClass, MyClass>> Func1() { ..... ..... yield return Tuple.Create(MyClassObj1, MyClassObj2); } And I hav...
stackexchange/codereview
I'm writing a simple winforms application, and I'd like to use a DataGridView to display some application data (not from a table) to the user. It is easy to set an IList to the DataSource, but this requires having a class with the property names and order that you want to display. How can I create a view over my data/...
stackexchange/codereview