instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
How can we compare if two IP are in same network/range or not ? Suppose i get one IP Address as 172.24.18.257 and other one as 192.25.14.85 , here how i can check whether they are in same range/network or not ? How can we do this MFC (VC++ ) ? Any idea is highly appreciated. Thanks.
stackexchange/codereview
When we export an SSRS 2008 report to excel and then copy a range from that file to another excel file, the colours used in the report are changed to something that is totally different, very annoying when we use 'Conditonal Formatting' to colour some of these cells a specific colour. Any ideas why?
stackexchange/codereview
i need that my user interface haves 3 sections NORTH SECTION: four textviews with info about a user MIDDLE SECTION: a googlemap view with the position of the user SOUTH SECTION: a textview with time of last position, and a button to actualice the position (retrieving it from a database) is this possible? i can't find ...
stackexchange/codereview
Is there a way (with distribute or another package) to manage different distributions (meaning different setup.py files) of the same Python package?
stackexchange/codereview
I'm using php to parse my xml file, all I want to be able to do is to get the element child value from the attribute: <question number="1"> <type>Main</type> </question> <question number="2"> <type>Secondary</type> </question> Pseudo Code (doesn't work): $xmlDoc = new DOMDocument(); $xmlDoc->load('qu...
stackexchange/codereview
#import "InstatwitViewController.h" @implementation InstatwitViewController - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *) pickerView { return 2; } - (NSInteger)pickerView:(UIPickerView *) pickerViewnumberOfRowsInComponent :(NSInteger)component { if (component == 0) return [activities count]; else ...
stackexchange/codereview
Is there a way to #import a class from a string in Objective-C at run time? Any methods that would produce a similar result would also be welcome. Edit: I want access to a class whose name I determine at runtime. So something like this: NSString *className = getClassName(); Class myClass = loadClass(className); myCla...
stackexchange/codereview
Is it possible to show hyperlinks in javascript alerts? I mean, if I do something like alert("<a href='http://stackoverflow.com'>LINK</a>"); the alert will show only the plain text "LINK". Is it possibile to show it like a clickable url? Thanks
stackexchange/codereview
A lot of people still use tables to layout controls, data etc. - one example of this is the popular jqGrid. However, there is some magic happening that I cant seem to fathom (its tables for crying out loud, how much magic could there possibly be?) How is it possible to set a table's column width and have it obeyed like...
stackexchange/codereview
I run a mysql query that gets specific results from a table. I then want to print these results in two html tables. The first ordered by one column which is already done by putting ORDER BY into mysql query. But then I want to print the results ordered by a different column. However, I don't want to run a mysql query a...
stackexchange/codereview
I have a .NET application in which assemblies in separate AppDomains must share serialized objects that are passed by value. Both assemblies reference a shared assembly that defines the base class for the server class and also defines the base class for the entiy type that will be passed between domains: public abstrac...
stackexchange/codereview
I have a QuerySet like: items = Item.objects.all() Item has a 'name' field. In the template I want to show: A Axes Alcohol B Bazookas C Coins Cartridges S Swords Sparrows So the items are ordered and group by the first letter. Missing letters are omitted. Does anyone have any ideas?
stackexchange/codereview
In my android application i am implementing map functionality. it has a tab bar when i jump one activity to another activity through tab its working perfectly. but when i come on map activity and try to move from it through "Back key of device" the entire application freezes and after a couple of seconds I get the drea...
stackexchange/codereview
I've been coding a OCR book scanning thing (it renames pages by reading the page number), and have switched to a GUI from my basic CLI Python script. I'm using PyQT4 and looked at a ton of documents on drag and drop, but no luck. It just refuses to take those files! I was using these to articles for my UI design: http...
stackexchange/codereview
I want to export the structure and data in my database into a .sql file to then execute as a query on another machine. Any ideas on how this can be achieved? I have tried using the database import/export wizards to no avail...
stackexchange/codereview
I am trying to use org.apache HttpClient and Facebook-API to create a server application. It has to automatically login to facebook using the username and password provided into a configuration file. In this application I know the application ID, the API_KEY and the SECRET. I also have, as I said, the username and the ...
stackexchange/codereview
this is my code so far, what I'm trying to do is process the io_up.php file when the user leaves the page. It was also be great if i could pause the page load for 3sec after file is processed. <script type="text/javascript"> function setConfirmUnload(on) { Window.onbeforeunload = (on) ? unloadMessage : null; } fu...
stackexchange/codereview
I've been working on a script, and I need it to basically: Make the image greyscale (or bitonal, I will play with both to see which one works better). Process each individual column and create a net intensity value for each column. Spit the results into an ordered list. There is a really easy way to do this with Imag...
stackexchange/codereview
i have this in the controller @ads = Ad.all(:joins => 'LEFT JOIN states ON ads.state_id = states.id') but i have problem to query field of states table. any idea? <% @ads.each do |ad| %> <tr> <td><%= ad.title %></td> <- title is ad field.no problem <td><%= ad.name %></td> <- name is states field.problem at he...
stackexchange/codereview
While developing Eclispe plugin, I am able to programmatically rename a class-field using the following code. RenameSupport renameSupport = RenameSupport.create(field, newName, RenameSupport.UPDATE_REFERENCES); renameSupport.perform(workbench.getShell(), workbench); But it applies the changes to the actual source file...
stackexchange/codereview
At this moment I'm using DriverManagerDataSource with @Transactional annotation to manage transactions. But all transactions are very very slow, probably because data source open and close connection to db each time. What data source should I use to speed up transaction?
stackexchange/codereview
There is a column 'Keys' in a table. With data Like this Key Name 1 aaa 2 sads null asd null asd Now I need to replace null values with 3 and 4. How can I do that.
stackexchange/codereview
a very basic question: When I include the DOCTYPE at the beginning of my .html document: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> It messes only a small part styling of the page. Here you can s...
stackexchange/codereview
I've been working through some examples in a book using pear for the first time... so far it seems pretty cool, but I'm having a small problem where I need to tweak the formatting of one particular column of the table generated from Structures_DataGrid & HTML_Table - specifically I need it to not wrap the text in a cel...
stackexchange/codereview
I have an NSCollectionView that I want to accept items dragged from elsewhere in my application. I implement collectionView:validateDrop:proposedIndex:dropOperation: and collectionView:acceptDrop:index:dropOperation: in the collectionview's delegate and register for the appropriate dragged types. Both methods get calle...
stackexchange/codereview
A coworker and i were debating today whether or not it is ever useful to make this sort of a function: private void MyFunction(ref MyClass variable) { } The only advantage i can see is that it would allow you to set the original pointer to the variable to null... outside of that there would be no difference i...
stackexchange/codereview
Find the k th smallest element in the union of 2 sorted lists of size m and n with efficiency log(k) ,, i have done a lot of thinking and searching i also got the pesedocode and the explain to it ... so far i still doesn't get or understand the the question right .. any help will be appreciated....
stackexchange/codereview
Quite complex, but intrinsically simple. I have a frm, with a tickbox and a link which says Terms and Conditions. The scenario, user clicks the link, which opens a modal window. This has terms and conditions in it, and cannot be closed, unless user agrees to our terms, by clicking submit button ( acceptance ) What I wi...
stackexchange/codereview
$_query = 'UPDATE ' . TABLE_A1 . ' SET active=0 WHERE user_id IN ( '; foreach ($newUsers as $newUser) { $_query.=$newUser. ' ,'; } $_query = rtrim($_query, ','); $_query .=')'; Is this a performant way of editing multiple table entries...
stackexchange/codereview
I have a ASP.NET MVC configuration, and I am building a reportgenerator. I am outputting a JQuery table, so that the user may sort and rearrange it, before fetching it as a PDF. My PDF component is .NET-based, and so I need to send the modified table back to the server via AJAX. The problem is that the URI can get as l...
stackexchange/codereview
I have set some constants. public final double TWO = 50; public final double ONE = 5; I have a number this.number I want to check if the number is between ONE and TWO. I got if (this.number > ONE ) I cant work out how to check if its between though. Cheers
stackexchange/codereview
Assuming a regular <input type=text> text-box with data in it. Is it possible to detect (via JavaScript) the position of the text-coursor inside that text-box? I am able to detect an ARROW LEFT or ARROW RIGHT keydown event - but how to detect the cursor location? Why I need this: I have a dynamic text-box here: ...
stackexchange/codereview
I wrote a .NET application with a Windows Forms GUI. The application starts a long running algorithm in the main GUI thread (no second thread is created). The algorithm logs progress information using System::Console. The System.Console is redirected to a TextBox using System.Console.SetOut(). For the first 10-30 sec...
stackexchange/codereview
I have these images that will load when I input a certain string of text but I don't know how to combine functions to make a generic one that will work for all of the images. These are just two and they're basically the same thing except I have to make each function (something)1 and then (something)2 for the next image...
stackexchange/codereview
I have the following which outputs a select box: <%= f.label :request_type_id %><br /> <% requestTypes = RequestType.all %> <%= f.collection_select :request_type_id, requestTypes, :id, :title, :prompt => true %> What is the rails method to instead output Radio Buttons?
stackexchange/codereview
I don't see what is wrong, does submit() not work anymore? <html> <head> <title>This is the title</title> <script type = "text/javascript"> function onLoad() { document.getElementById("input1").value="text1"; document.getElementById("input2").value="text2"; document...
stackexchange/codereview
I have a div which is supposed to stay at the top of the viewport even when scrolling (position: absolute). I have a some hidden elements that I display on demand with jquery function show(). If I show() a long element, I have a scrollbar appearing. If I scroll the top div doesn't follow the scrolling. It seems the new...
stackexchange/codereview
I am using the Bluetooth Chat sample app from android website. I want to send a long message in a particular format (mentioned below in the code) and receive it on the other side and display on my phone (HTC Desire). I will parse this message further, extract few things and use it for my app. I am not able to receive a...
stackexchange/codereview
Seems to be a simple question, but I can't figure out how to do it. I have a horizontal LinearView with something of fixed size at the left, then comes some text which should take as mich space as possible, but on the right should be another fixed-size object. Now, my problems are right now: When the text in the middle...
stackexchange/codereview
I'm trying to migrate a small ASP.NET MVC 2 app to Java on Tomcat 6. I know the basics of JSPs and servlets. I don't know any MVC Java web framework. So I'm trying to determine how to proceed in a way that will keep the migration effort to a minimum. I know I'll have to rewrite the app in Java but how do I map ASP....
stackexchange/codereview
I'm having a really hard time getting an R library installed that requires some compilation in C. I'm using a Mac OSX Snow Leopard machine and trying to install this R package (here). I've looked at the thread talking about getline on macs and have tried a few of these fixes, but nothing is working! I'm a newbie an...
stackexchange/codereview
We have a .net library developed in C#. It needs to be exposed to a unmanaged C++ client thats available in a remote machine. By what means could we resolve this?
stackexchange/codereview
class ArrayApp{ public static void main(final String[] args){ long [] arr; arr= new long[100]; int i; arr[0]=112; arr[1]=111; for(i=0;i<arr;i++) { System.out.println(arr[i]); } } } I get this error, ArrayApp.java:10: operator < cannot be applied to int,long[] ...
stackexchange/codereview
I need to create a deep zoom mosaic in an HTML5 Canvas Element with thousands of roughly 512x512 images, but I want to reinvent the wheel as little as possible. So rather than combining tons and tons of large images into one then creating a Deep Zoom Image, I'd rather make a load of deep zoom images and create a Deep Z...
stackexchange/codereview
Considering that this is a very basic task, I could not think of an appropriately easy way to do it. How would you get the index of the lowest value in an int array? Using Linq/MoreLinq is possible. I could not find a reasonable one-liner so far.
stackexchange/codereview
I've run into this problem a few times now, but I couldn't find an exact answer on it anywhere. I want to animate a UIButton's change in width, similar the to effect in the App Store when you press the FREE button and it changes to INSTALL. After the touch, the button expands but doesn't move. In the app store, the but...
stackexchange/codereview
Hi I am trying to implement hasPathSum() means for given number is there any path exist between root-to-leaf node. I got this code from Stanford website. And i am thinking this is wrong /** Given a tree and a sum, returns true if there is a path from the root down to a leaf, such that adding up all the values alon...
stackexchange/codereview
As of yesterday (perhaps after a recent PHP update?), I'm getting some very strange non-deterministic bugs in php 5.3.3. These appear in our production server in PHP 5.3.2 as well. The errors essentially amount to Fatal error: Uncaught exception 'ErrorException' with message 'Attempt to assign property of non-object' i...
stackexchange/codereview
For example, when I visit http://www.nerddinner.com/Home/About/, the About tab points to http://www.nerddinner.com/Home/About/ which is what I expect. However, If i were to visit http://www.nerddinner.com/Home/About/WhyDoesThisLinkChange, not only is this page valid but the About tab also points to http://www.nerddinne...
stackexchange/codereview
I have a wordpress instalation that is not redirecting urls not starting with www. Example: http://example.com/dir/ doesn't send to http://www.example.com/dir/ instead goes to http://example.com/ How do I change the .htaccess below to always redirect to the page either using www or not? # BEGIN WordPress RewriteEngine ...
stackexchange/codereview
I have an Out-of-process COM server executable which was developed using Visual Studio 6.0 and it has been working fine for the past 10 years. Now I converted this project to Visual Studio 2010 and encountered a problem with GetInterfaceFromGlobal(). I'm using the GIT to hold IDispatch pointers to each of my COM client...
stackexchange/codereview
well this is my very very first project with fluent hibernate.i've had small experience in hibernate and nhibernate. This context is completely new to me since this is a web app project. So i have my webapp project with most of the fluent nhibernate found on the net. so i have This entities: namespace myproject.model {...
stackexchange/codereview
I am having a few issues with fancybox and google maps(v3) when displaying the contents of a KML file. When displaying the balloon that contains the description, I have a thumbnail of an image that I want to display when clicked using fancybox. The problem I have is that when the thumbnail is clicked the the fancybo...
stackexchange/codereview
I've got a FlowDocument generating a document for a client, and it's getting a line break that they don't like. Is there any way to mark a section of text that it should avoid line breaks? Something like this: <Paragraph>Here is a paragraph where there should be <span NoLineBreak=True>no line break</span> in a certai...
stackexchange/codereview
I have make one procedure which has in and out parameter: delimiter // DROP PROCEDURE IF EXISTS empInfo ; CREATE PROCEDURE empInfo (tblname VARCHAR(50), clName VARCHAR(50), out total INT) BEGIN SET @s = CONCAT("SELECT count(", clName ,") into total FROM ", tblname ...
stackexchange/codereview
KNOWN THINGS : When a .msi is built, a manifest is built into it. The manifest defines, among other things, the resources (including privilege elevation) the .msi needs to install successfully. UNKNOWN THINGS : 1.Can this Manifest option be set anywhere in Installshield with Administrator privilege as default ? 2.Is th...
stackexchange/codereview
Is there any difference between: echo "<p>" . $var . "</p>"; and <p> <?php echo $var; ?> </p> when it comes to performance? Joel
stackexchange/codereview
After editing an article or logging in some forums or CMS, you get a intermediate page that say something like "Thanks for X, if you didn't redirect in few seconds click here". Why they do that instead of going directly to the page?
stackexchange/codereview
I am in dire need of a classification task example using LibSVM in python. I don't know how the Input should look like and which function is responsible for training and which one for testing Thanks
stackexchange/codereview
How to get domain name from Given IP in MFC (VC++) ? The code i am using is as below: #include "stdafx.h" #include <winsock2.h> #include <ws2tcpip.h> #include <stdio.h> // link with ws2_32.lib #pragma comment(lib, "Ws2_32.lib") int _tmain(int argc, char **argv) { //----------------------------------------- ...
stackexchange/codereview
I'm currently trying to implement an AOP system to add automatic audits to decorated attributes of objects (done by an extended version of INotifyPropertyChanged). The automatic audit contains the propertyName it's old value and the new value. I'm currently using Castle's DynamicProxy2 as there are excellent tutorials...
stackexchange/codereview
I'm creating my MSI install package for my Web App and all projects are targeted for .NET 3.5. (in Visual Studio 2010) Also, I have disabled prerequisite installs when generating the MSI package. However, when attempting to install on a machine without .NET 4, it asks me if I wanted to install the .NET framework. Any i...
stackexchange/codereview
I'm trying to implement a two-lock concurrent queue in Java, but I can't get it to pass the automated tests. Please let me know the errors in my code: private static class Link<L> { L val; Link<L> next; Link(L val) { this.val = val; this.next = null; } } T v; private Link<T> initNode = new Link<T> (v); priv...
stackexchange/codereview
Hello awesome dev community. I have looked for an answer to this for days now and just can't seem to find a handle, so decided to post Q myself. I have a game that has menus for picking items. The menus can have 2 -> 30+ items, so they need to scroll. There are also category menus, which when an item is clicked, a new ...
stackexchange/codereview
I just want to read the system memory, not the memory allocated for other processes, just free memory. I tried allocating huge memory using malloc: char *ptr; ptr = (char*)malloc((1024*1024*700)*sizeof(char)); I tried to print it, but it is printing the null character (i.e. nothing). printf("%c",ptr[i]); So I casted ...
stackexchange/codereview
Im having a trouble converting my scripts to jQuery. How can I compute two elements at once? <script type="text/javascript"> function Compute(target, currentValue){ if(parseInt(currentValue.value) == 0 || parseInt(currentValue.value) > parseInt(target.value)) { alert("That Value is not Valid"); } } </script> ...
stackexchange/codereview
I'm beginning to learn python and here I'm trying to read from an xml file using ElementTree: import sys from elementtree.ElementTree import ElementTree doc = ElementTree(file="test.xml") doc.write(sys.stdout) However I get this error: File "my_xml.py", line 2, in from elementtree.ElementTree import ElementTr...
stackexchange/codereview
So what are mono´s requirements to an operating system or hardware?
stackexchange/codereview
I want to get an animated text in Android where it should run from left to right on the screen. Eg. I want to get this text private static final String QUOTE = "Nobody uses Java anymore. It's this big heavyweight ball and chain."; running from right to left using animation. However, this text gets truncat...
stackexchange/codereview
I have a jar application that contains several reports (files .jasper) and the way that I get the path of the report is: getClass().getResource("/reportes/mireporte.jasper").toString(); but when I execute I get the next error: FileNotFoundException although the report is within the jar file when I open it with the win...
stackexchange/codereview
is there in any double byte encoding a character that one of it's bytes has the same value of the ASCII characters '<' or '>' ? i cant seems to find one, but i have to make sure that there is no such cases, since such double byte characters might cause errors on html parsers.
stackexchange/codereview
I would like to use gcov with my unit test written using QTestLib. I have managed to generate some .gcno files along my object files by adding this to my .pro file : QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage -O0 But, when I run : gcov main.cpp.gcno I got a bunch of .gcov files generated with non-useful conten...
stackexchange/codereview
I have a UITable with a custom UITableCell. When the table displays most of the items are blank except for the disclosure triangle. As I scroll up and down cells randomly turn on and off, but at any given moment, most are blank. Additional information: 1) It is the "right cell". When I click on the disclosure, it go...
stackexchange/codereview
I have a custom WPF Line and its style. UserControl Resources: <!-- Framework properties to update --> <SolidColorBrush x:Key="MyLineBrush" Color="LightGreen" /> <sys:Double x:Key="MyLineStrokeThickness">1</sys:Double> <!-- Custom property to update --> <sys:Boolean x:Key="MyLineIsArrowUsed">false<...
stackexchange/codereview
I'm writing a program in C++ that needs to generate a set of points in the xyz coordinate plane. The set of points varies depending on a number x. The first set has the point (0,0,0). The second set has (0,0,0), (1,0,0), (1,1,0), (1,1,1). The third set is contains the second set and adds the points (2,0,0), (2,1,0...
stackexchange/codereview
Well, simple question: I have a singleton object that extends scala.swing.Panel, and I want to have it react on a simple mouse click. But... well, it doesn't work. Since Scala's such a new language, finding infos to specific problems is not so easy. Maybe you can help: import scala.swing._ import scala.swing.event._ im...
stackexchange/codereview
I'm developing a website where a user can search for 'something' near their location that they enter (in the UK). There maybe say up to 10+ matching results, but the client only wants 3 results to be shown at any one time. Because each 'something' is paying the same amount to be listed, each 'something' should have the...
stackexchange/codereview
I have a table view which I want to bring up in edit mode under some conditions. I can set the table itself into editing mode with the following code: [self.tableView setEditing:YES animated:YES]; But this view controller also has an editButtonItem, which comes up in normal mode, showing "Edit" on the button. I woul...
stackexchange/codereview
Given the following html fragment, how can i select all the div's with class a or c only if they have a child div with class a1 Rigth now i have the following xpath query: //div[@id='z']/div[@class='a' or @class='c'] <div id="z"> <div class="a"><!-- Should be selected --> <div class="a1"></div> </div>...
stackexchange/codereview
iam using google map in my php script to display the address of a company. But the map is only displaying the default city location of the address, not going deep. For example, if i specify the address as: Angadalavari Street, Behind Bodima Hotel, Kothapet, Vijayawada But the map is showing only the location Governorp...
stackexchange/codereview
After I perform a large delete on a table what steps should I take to ensure that space that was taken up by those rows is reallocated back to SQL Server? Run Statistics on that table, etc? Maybe I don't need to do anything, was just wondering what if there were any follow up steps. Thanks, S
stackexchange/codereview
I'm writing 2 functions in matlab, an initialize function and a function to insert items into an array treating it like a doubly-linked list. However, my initialize function only returns "ans =" and the initialized array. How can I have it also set values of my other variables? Here's my code: function [ array, listp,...
stackexchange/codereview
Does anyone have any ideas on where the worst Global Hackers Live (from a USA perspective). By this I mean, where do warez, serialz, botnets, spammers have their residence? In what countries are those hackers most likely to live? How do they connect to the internet? Is banning their home continent effective in curbing ...
stackexchange/codereview
I have one dedicated server which has the whole Lamp-Stack, SVN and Hudson installed. I would like to create a freestyle Hudson job, that gets the latest sourcecode out of my SVN-repository and puts it into my /var/www/myWebApp Folder. How does the shell script need to look like? EDIT When I just use svn export myRepoU...
stackexchange/codereview
This situation may be far more complicated than I want it to be, but I am bringing it forth anyway. This is for a game-type design. The values here are hard coded, but that will not be the case in a real environment. Basically, there are lists of classes known as Interpreter that contain the appropriate information t...
stackexchange/codereview
I'm creating a simple twitter to learn Titanium. What I have is a tableView populated from a live twitter stream. What I need to know is how I create clickable links from twitter user names, to be able to open that user's profile. I can get the regexp'd usernames, but don't know how to do something with them. Any he...
stackexchange/codereview
it looks like the library in the interface builder has an iAd I can drag into my .xib file. But this doesn't seem to be the right way since I'm weak linking the iAd framework and potentially devices that don't have iOS 4.0 won't work. Therefore, I need to add the banner programmatically (i.e., NOT use the interface bu...
stackexchange/codereview
Can someone explain how the following Ruby code works? (taken from gist: 675667) require 'rubygems' require 'rack' class Object def webapp class << self define_method :call do |env| func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) [200, {}, [send(func, *attrs).to_s]] en...
stackexchange/codereview
Say I have a text "favorite video url" field in my app, I need a way to tell rails that this is a url and then get be able to get parameters from it, for instance, if the user inputs http://www.youtube.com/watch?v=RV0-DgsDLhs I want to be able to get the 'v'param and store it in a variable. Please help
stackexchange/codereview
What is a query to select data from NetFlix API using YQL? I tried to run select* from netflix.catalog where key = "xxxxx"; but got an error Cannot find required keys in where clause; got 'key', expecting required keys: (cks, term, ck) update: I checked it asks for SELECT * FROM netflix.catalog WHERE term="" and ck="" ...
stackexchange/codereview
I am beginning the process of putting together a design document for my companies database. I am trying to use as many formal standards as I can. Does anyone know "Is there a standards document (like IEEE 1016 1998 IEEE Recommended Practice for Software Design Descriptions) for databases"? WIKI talks about a Databas...
stackexchange/codereview
Lets say that I have a math function that is defined recursively. Like so: T(1)(x) = 1 T(n)(x) = 2x*T(n-1)(x)-1 So: T(1)(x) = 1 T(2)(x) = 2x*1-1 = 2x-1 T(3)(x) = 2x*(2x-1)-1 = 4x^2 - 2x - 1 /* and so on... */ Basically, I know how to write a program that will count T(15)(x) if the x is given. Thats not a problem. Wha...
stackexchange/codereview
so in Objective-C I can have a reference to object that implements certain protocol like this: id<MyAwesomeProtocol> object; I could have a reference to some class, like this: MyAwesomeClass *object; I was wondering, what should I do to have reference to MyAwesomeClass, or any sub-class. I could of course just use id...
stackexchange/codereview
Starting with an Array arr, and a List of axes lst of length k, what's a good way to sum out values over axes specified in lst? When lst={1,2,...,m}, this would be the same as Nest[Total,arr,m] Example: arr = Array[a, {2, 3, 4}]; Then f[arr,{1}] would have dimensions {3,4}, f[arr,{2}] will have dimensions {2,4}, f[arr...
stackexchange/codereview
Can i create successfully a timer clock on a thread? i'm creating one but it doesn't seem to work that well. My app is a multi-thread app that has to start a timer on a thread when ever a certain event happens. The timer is placed in every client connection. The clock doesn't work until i close my winform(i don't know ...
stackexchange/codereview
I need to run the code of a button that is on another form. is it possible to do it from a different form? if you say that it is possible by declaring it public then: how do i declare a control public? how do i pass the correct events into button_click? it takes two parameters - how do i pass them,?
stackexchange/codereview
I have a form within a tabbed panel, when I submit the form I am redirected to a new page. I'd like to redirect to a new page within the current tab. What is the best way to achieve this? Here is my code for the tabbed panel with form - <%@ taglib prefix="s" uri="/struts-dojo-tags" %> <%@ taglib prefix="sx" uri="/stru...
stackexchange/codereview
I'm sure I'm missing something, but I'm just trying to get an app widget with a button and a counter. Every time I click the button I want the counter to update by 1. I've set the onUpdate() function of the WidgetProvider to register a pending event to the button so that it starts a service to bump the counter numbver:...
stackexchange/codereview
I use the following code to build my tables from my models: Doctrine::createTablesFromModels(); I'm just starting out on a new project and it is the first time I've used Doctrine in an application. So far, since I'm just getting started and don't have any data, I've just been dropping the tables in phpMyAdmin and runn...
stackexchange/codereview
Im trying to kill a windows service and then restart it using just a batch file. I tried using the following code TASKKILL /F /FI "USERNAME eq \SYSTEM" /IM NoDinero.exe And was given this message: "no tasks running w the specified criteria"
stackexchange/codereview