instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
is it possible with javascript, PHP (or anything!) to see if the iphone is using 3g or wifi from a website? We want to load low-res content if its 3G you see,
I found SCNetworkReachabilityFlags but that is just for apps...
Any pointers would be great!
Dan
| stackexchange/codereview |
Hey I've found a lot of people asking questions similar to mine but not exactly the same.
I have a database that stores IPs. There is a server field and a client field. I want to look through both these fields and pull out all the distinct IPs for them and then find out how many occurrences there are of each IP as a ... | stackexchange/codereview |
Currently struggling with finding a way to validate 2 tables (efficiently lots of rows for Table A)
I have two tables
Table A
ID
A
B
C
Table matched
ID Number
A 1
A 2
A 9
B 1
B 9
C 2
I am trying to write a SQL Server query that basically checks to make sure for every value in Table A there exists ... | stackexchange/codereview |
I am looking for expert advice on how to best serve multiple sites with one Drupal instance (using Pressflow 6.x). Let's consider the company needing this is called "ABC Group of Companies" and it has 3 sister concerns. So, altogether there will be four sites:
www.abcgroup.com
www.company-a.com
www.company-b.com
www.c... | stackexchange/codereview |
Question: I have a document management system, and I am building a Web-Service interfaces to the database.
Everything works so far, just that right now, it's totally unsecured, everybody can access it.
How can I incorporate password or private-public key authentication ?
I can only find 'best practises' and using 'wind... | stackexchange/codereview |
I am newbie in WinCE Programming, i want to Create Custom File Dialog for our application, which has totally diffrent look and feel than the default windows file dialog....
I looked into many Flag value bt they won't worth it ...
Any pointers will be helpful
Thnks...
Mukesh
| stackexchange/codereview |
I am interested in reducing the time of adding rows and colums to tablelayoutpanel dynamically.
I need to add 10 rows and 10 columns (maximum 10x 10 =100 controls, may be less than 100 depending upon user input), I have construct the logic which works good but the problem of my logic is it's taken considerable time in ... | stackexchange/codereview |
I have a DataGrid that is displaying some data at multiple points in my SL 4 app. I would like reduce redundancy. Is the correct way to do this by extracting it into a UserControl?
I did this. However, instead of setting dataGrid.ItemsSource in the code behind, I'm setting myDataGridControl.ItemsSource. However, MyData... | stackexchange/codereview |
I am currently trying to send binary data out through pexpect. For some reason, the data gets through just find except for a 0x04, which is just skipped over. I tracked down the pexpect call to determine that all thats happening is an os.write() call to a file descriptor opened from a pty.fork() command.
Any ideas? ... | stackexchange/codereview |
i would like to know how to do the following:
step 1: how to send the following string from the iphone to a mac computer via WIFI when a user presses a button.
string to be sent: "hello".
step2: how to receive that string with an application i would have to create. it will be very simple. it will have no interface, exc... | stackexchange/codereview |
My objective is to get communication started on openfire through strophe. But have a few questions like:
What is the language that strophe will be written in?
How and where are the connections written?
Just some basic guidance or a good link to a starter tutorial will be very helpful.
| stackexchange/codereview |
when I'm using this mapping
Mapper.CreateMap<DataSourceConfigurationContract, DataSourceConfigurationContract>().ForMember(x => (object)x.DatabaseTypeException, opt => opt.Ignore())
.ForMember(x => (object)x.Databa... | stackexchange/codereview |
While editing javascript content VisualStudio is starting to bug me with how it keeps inserting highlighted suggestions. For example it keeps inserting valueOf( if I type val(. This is really annoying.
I want to invoke intellisense manually just like I can with C#, is there any way of turning off the auto-complete sugg... | stackexchange/codereview |
Hi I am working on a gem that defines a few view helpers and it heavily relies on concat and capture methods but I've recently discovered it doesn't work with HAML (haven't tested thoroughly, but so far doesn't render concat(nated) stuff).
I read somewhere there was a haml_concat version of concat. So If I just need to... | stackexchange/codereview |
am new to iPhone and i have been given a task to show all the images from the gallery of the iPhone to the current view so that the user can select an image and view it and here's the second part of my problem i am having a share button and its functionality is that the selected image by the user on the touch of the sh... | stackexchange/codereview |
Input is a URL like this http://ws.geonames.org/children?geonameId=6255148 and I would like to receive the XML file in a SimpleXMLElement for example?
| stackexchange/codereview |
I would like to run a text countdown on canvas but last I checked there was no way to write text to a canvas.
I would like to know if anyone else has come-across an implementation where I could do a numerical countdown from 60 to 0 on the canvas.
| stackexchange/codereview |
I'm storing a file through GridFS and saving the id like so:
$file_id = $gridfs->storeUpload('texture');
$item = array(
'name'=>$_POST['name'],
'description'=>$_POST['description'],
'price'=>$_POST['price'],
'categories'=>$category_array,
'tags'=>$tag_array,
'file'=>$file_id
);
$collection->in... | stackexchange/codereview |
I am working on a school-project with two classmates. Our task is to make a dynamic gallery for web.
So we got the whole gallery up and running perfect, except chrome is acting mighty weird about it.
We have our pictures uploaded in blob, as well as our thumbnails. We load them from the database through php.
<div id="c... | stackexchange/codereview |
i was requested to make in android a view that groups several items like checkboxes or text views in vertical rows, separated by transparent dividers while the background is with a certain alpha level and the edges are round.
I thought of two solutions and i hope for some feedback on good\bad or other solutions if you ... | stackexchange/codereview |
Im using matlab and am having some difficulty. I am trying to swap the columns of one matrix (A) with the column of another matrix (B). For Example:
A =
4 6 5
7 8 4
6 5 9
1 0 0
0 1 0
0 0 1
B =
1 0 0 0 0 0
0 1 ... | stackexchange/codereview |
I have a Silverlight application that does two things:
1) connects to a WCF server (hosted inside a WPF app on a different PC) and sends small packets of info (using PollingDuplexHttpBinding if it matters)
2) sends a web request for get an XML file from a different remote server for parsing
At dev time, its all running... | stackexchange/codereview |
I have a view (nib) loading offscreen in a uiscrollview. I want the movie in this view to only start playing once it is visible but the viewdidappear fires even the view is off screen. So the movie is playing even though you can't see it.
Is there a way to understand what view is actually visible that does not involve ... | stackexchange/codereview |
I have included jquery and jqueryui from google api as follows
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
I want to use jquery ui s... | stackexchange/codereview |
I remember touching on this subject during a class on programming languages. I vaguely remember that a struct could be seen as a mathematical tuple. Is it possible to describe a class or an object in a similar fashion?
| stackexchange/codereview |
#include<iostream>
#include<fstream>
#include<cstdlib>
#include<string>
using namespace std;
**int main()
{
double write();
double read();
string choice;
while(1)
{
cout<<"Enter read to read a file and write to write a file.\n";
cin>>choice;
if (choice == "read")
cout<< ... | stackexchange/codereview |
Is there a way to put 3 trs ina table inside a box kind of border??
| stackexchange/codereview |
I have made a music app using avtouchController & I want to play my next song one after the other using autoplay can u please give me the step to autoplay a song.
| stackexchange/codereview |
I'm confused about the session states of SQL Server sessions. Can anyone explain it?
| stackexchange/codereview |
i am writing a php script that compress local javascript files into one from an html page. Now i want to delete local references except external javascript files.
for example, i have following variables.
$my_domain = "mysite";
$base_url ="http://www.mysite.com"
I want to delete all local javascript references except e... | stackexchange/codereview |
suppose to have the following string:
commandone{alpha} commandtwo{beta} {gamma}commandthree commandtwo{delta}
and I want to abtain:
commandone{alpha} beta {gamma}commandthree delta
well I'm triying with regex and sed, I can easily find if is it present the pattern I look for
/commandtwo{.*}/ but not erasing commandt... | stackexchange/codereview |
I'm trying to open a project that has a folder called MyApp.ServiceHost and inside has a project called ServiceHost.csproj.
The folder layout is sorta like this:
SLN
-> Services
- -> MyApp.ServiceHost
- - -> ServiceHost.csproj
-> MyApp.OtherStuff
Everytime I try to open the solution I get ".ServiceHost" is not a supp... | stackexchange/codereview |
I wanted to implement ball physics and as i m newbie, i adapt the code in tutorial
http://adam21.web.officelive.com/Documents/JavaPhysicsTutorial.pdf .
i try to follow that as i much as i can,
but i m not able to apply all physical phenomenon in code, can somebody please tell me, where i m mistaken or i m still doing s... | stackexchange/codereview |
I am trying to build a continuous integration server on a Windows 7 machine. I can run the msbuild script cleanly on that machine but when I attempt to run it via a build agent the registration of certain COM (.NET and c++) components fail seemingly to do with write permissions to the registry. I have turned off UAC bu... | stackexchange/codereview |
this is my first question, so please be gentle ;)
I'm stuck with a weird problem. Essentially i get three XSD definitions like the following:
PartA.xsd
targetNameSpace="PartA"
include="PartB.xsd"
PartB.xsd
<!-- no namespace definition!!! -->
PartC.xsd
targetNameSpace="PartC"
inlude="PartB.xsd"
import="PartA.xsd"
The... | stackexchange/codereview |
I am using a QTimer and connecting its timeout signal to the method animate(). In animate(), I am displaying a QPushButton at different positions using a loop. The problem is that the QPushButton is not visible till the loop is finished. It should be giving the effect of a moving object. The following is Qt Jambi code ... | stackexchange/codereview |
I would like to have my release build use the minified version of css/javascript 'A' and the debug build use my uncompressed version of css/javascript 'A' is there any way I can do that on and ASP.Net page? Essentially I am lazy and don't want to have to change references everytime I do a publish.
Thanks in advance.
| stackexchange/codereview |
I am a newbie at Flash/Flex and Actionscript 3.
I would like to know how can I create a dress up game in Flash/Actionscript where users can click on (not drag and drop) the available accessories/clothing and the avatar will display with the new selection immediately, and I can save the settings and take snapshot of th... | stackexchange/codereview |
Why does this output: "inside String argument method"? Isn't null "Object" type?
class A {
void printVal(String obj) {
System.out.println("inside String argument method");
}
void printVal(Object obj) {
System.out.println("inside Object argument method");
}
public static void main(S... | stackexchange/codereview |
I'm trying to redirect a URL that looks like
'accommodation/destination.php?code=108459&destination=Yang+Chum+Noi'
The regex I'm using:
(^accommodation/destination\.php\?code=([0-9]+)&destination=([^/]+)$)
...works fine in my regex tester but when I use it in the .htaccess file it doesn't work.
Am I missing something... | stackexchange/codereview |
I have a project which is coded with Visual Studio 2008. Today I migrated it to Visual Studio 2010 and i saw that i can not see add web reference. How can i get it back?
| stackexchange/codereview |
It's been 2 hours of struggle against SL grid on WP7. I build my grid using the following code:
public void initUIBoard() {
int x, y;
Button b;
for (x = 0; x < mine.cRows; x++) {
RowDefinition rd = new RowDefinition();
rd.Height = new GridLength(20);
... | stackexchange/codereview |
I'm running an existing Wordpress blog about a single topic with cleary distinguishable subtopics. Those subtopics generate enough interest and content that they could easily be a blog by themselves.
As I'm just running this one blog, each of this subtopics represents a category. For SEO reasons I now would like to run... | stackexchange/codereview |
I am using sitemesh defined jsp in decorator xml which needs to be refresh for every min. After refresh the page is duplicating header and footer.
I am using jQuery setInterval for refresh every min and given action name in load with div.
Can someone please help what are configuration changes I need to do for header ... | stackexchange/codereview |
I am trying to understand a little more about memory management. Knowing that I need to release anything that I have init or alloc'ed I am confused about the following:
- (NSMutableArray *)getData {
NSMutableArray *data = [[NSMutableArray alloc] init];
NSString *first = @"First object";
[data addObject:fir... | stackexchange/codereview |
Is there a way to determine location via CellID on a CDMA network? I can get a network ID, base station ID, and system ID programatically, but is there an api somewhere to convert these to lat, long coordinates? The CdmaCellLocation.getBaseStationLatitude() and CdmaCellLocation.getBaseStationLongitude() methods return ... | stackexchange/codereview |
I have an html table that is populated using a text file only and is basically sorted primarily by a timestamp.
I would like the option of also sorting the table data by a column ($keys) called "Server" so I can view sorted data based on the server name. Since this is not using mysql and I can't use an 'order by', is t... | stackexchange/codereview |
I'm trying to come up with a solution to this problem. I have a Ruby script that needs to run some PHP code, but I am new to Ruby, so I don't know how to go about doing this.
def run_my_code
#execute some PHP code here
# $person = new Person();
# $person->doSomething();
end
How can I achieve this?
| stackexchange/codereview |
My site has a jQuery drop-down navigation menu and that is displayed beneath the Flash. How can I display the navigation menu above the Flash object? I tried with setting wmode="transparent" but it is not work. Please provide some help to solve this problem
| stackexchange/codereview |
Hey guys, today i was inspired by a 16 bit ALU made in Mincraft to try and make my own self-extending adder.
I literally started JavaScript today, and have been playing around with logic gates over the past couple days. So I am very new to this.
Here is my code so far.
<html>
<body>
<script type="text/javascript"... | stackexchange/codereview |
I have an argument in Python that is screwing up my subprocess() command. The argument is:
--server-args="-screen 0, 1280x800x24"
args = [
'xvfb-run',
'--server-args="-screen 0, 1280x800x24"',
'/usr/bin/python',
'/root/AdamN-python-webkit2png-3ae4322/webkit2png.py',
'-o',
filename,
url,
]
I think it's... | stackexchange/codereview |
I'm working on creating XML docs from values in a database. Initially, the program exports this XML:
<customDataElementlanguage>English</customDataElementlanguage>
I've created this PHP to change the XML tree:
if ($Element->nodeValue = "EN") { $Element->nodeValue = "English"; }
$doc2 = $Element->ownerDocument... | stackexchange/codereview |
I have a randomly ordered C array of integer numbers.
Each of these numbers represents a color, and has its relationship to every other number in the array defined elsewhere (they are non-linear, and are based on both the brightness of the color and the hue).
I need a quick, efficient algorithm to sort these number... | stackexchange/codereview |
I'm having a problem with my login system. Sometimes it works, sometimes it doesn't. It seems that it fails on the first try more often than not and works on the second go around. There is NO ERROR; the page redirects to the home page as it is supposed to but the session variables are coming up empty.
The first code bl... | stackexchange/codereview |
Referring to the Open Graph protocol, I must implement this strange tag to my website in order to add a like-button for it.
<meta property="fb:admins" content="USER_ID"/>
USER_ID is supposed to be replaced by my actual user ID at Facebook. How do I safely obtain the correct user ID?
| stackexchange/codereview |
I am having some kind of classpath problem:
I've put my context.xml files in META-INF/spring/conf/
They can be perfectly found by Spring using classpath:WEB-META/spring/conf/root-context.xml
(root-context.xml references other xml's).
My Hibernate.cfg.xml is on src/main/resources, so it 'should' be on the classpath, how... | stackexchange/codereview |
Can I do something like working-dir="file:${user.home}/some-directory" within my .properties file? I am using ResourceBundle to load configuration from a .properties file and I would to inherit a system property key such as user.home for my working-dir property. It would be nice to be able to do this since I can have d... | stackexchange/codereview |
I'm very new on Android development.
I have this:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.message_user_registered)
.setCancelable(false)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface d... | stackexchange/codereview |
I am been stuck , while developing an alarm based application on android.
Currently my alarm is firing correctly.But i have kept a toast, to notify the alarm.
I want to use ringtone for alarm notification.
Can anyone, help me out with this.
Rgds
Yaaga
| stackexchange/codereview |
Does anybody know why there is no real support for generics/templates/whatsInAName in Go? So there is a generic map, but that's supplied by the compiler, while a Go programmer can't write her own implementation. With all the talk about making Go as orthogonal as possible, why can I USE a generic type but not CREATE a n... | stackexchange/codereview |
My task is to write small parts of data to file frequently and guaranteed. It's a some type of logging system, that must provide a guaranteed safety and speed of saving data to disk. I found that brakes appear in the Flush() function that is called too often. So, I decided to get rid of it.
I used flags, that prohibit ... | stackexchange/codereview |
I have been searching to figure out how exactly to use the oauthable module in the Devise gem for Rails 3. I have come across a couple of questions on here that seem correct, but I was unable to get the implementation working. My end goal is to have both Twitter and Facebook authentication through Devise in my Rails 3 ... | stackexchange/codereview |
I am trying to get my website to have a simple checkout flow where the person is able to create an account and pay for the product. I want to record this in the datastore so that the account gets created only when the payment has gone through and the person should be able to get back to the profile/personal page once d... | stackexchange/codereview |
I read that the following class is not thread safe since threads could read inconsistent data as there is a chance for a thread to read scaled version of real and unscaled version of imaginary. But I did not understand how.
I was under the impression that if a thread acquires a lock and is in scale() method, no other ... | stackexchange/codereview |
I have research on my question but it seem like only silverlight have timeline marker.. I want to show the user when is the next part of the video going to start at on the video slider but I really got no idea how to do it. Or is it possible to add images near the slider, to show user where/when will be the next video ... | stackexchange/codereview |
I've got some help turning my table of the sort:
Col
23
25
15
53
...
into something like 23,25,15,53...
The query that does it is
SELECT max(ltrim(sys_connect_by_path(flow_run_id, ','), ','))
FROM
(select flow_run_id, rownum rn
from table
where CREATED_DATE < sysdate - 32
and flow_id = 3
order by 1... | stackexchange/codereview |
How can I forbid the Backspace-Key as easy as possible in a WPF-Application?
The KeyDown-Event don't catch at the DEL and the Backspace-Key.
Thank you!
| stackexchange/codereview |
I would like to know whether there are any websites (not toy projects) that have been successfully built on top of GAE (excluding google) using whatever programming languages or frameworks that are available.
| stackexchange/codereview |
You enter in the "to" number and any "from" number, and the text message will send from that phone number. Not even the major SMS gateways support this, as they require all sender IDs to be pre-approved. So does anyone know how they set it up to send from that particular phone number?
| stackexchange/codereview |
We are using OpenTK, C# and visual studio 2010. We need to ask the graphics device if it supports texture2DArray's, and what anti-aliasing modes it may support. Any help will be appreciated.
| stackexchange/codereview |
Is it possible to do instance pooling of stateful session beans.. like if a stateful bean instance is being passivated, during the execution of prepassivate() remove all the state information associated with it and send it to the pool, if a request is received from a client during the postActivate() restore the state t... | stackexchange/codereview |
I'm writing drag & drop functionality in my HTML5 Canvas application and am wondering how to detect if I'm clicking on a shape other than a rectangle or square, in which case I would do something like this inside of my 'mousedown' event handler:
if (evt._x > 13 && evt._x < 202 .... ) {}
I don't see how to easily do so... | stackexchange/codereview |
After typing text into a combobox during run time, how do I add it to the combobox's items property? This is in C# 2010.
| stackexchange/codereview |
I had this class and subclass :
class Range:
def __init__(self, start, end):
self.setStart(start)
self.setEnd(end)
def getStart(self):
return self.start
def setStart(self, s):
self.start = s
def getEnd(self):
return self.end
def setEnd(self, e):
self.end = e
def getLength(self):
return le... | stackexchange/codereview |
I came across a situation where i had to count the number of occurences of each word in a string. I decided hashing would be the best way to do it (Find the hash value for each word that is encountered and increment the count at the position indexed by the hash value - assuming i use an array). What hashing algorithm ... | stackexchange/codereview |
Can I sync the local sqlite database on desktop/mac with sqlite database on iPhone for application by directly connecting the phone to my mac/pc?
| stackexchange/codereview |
I would like to resize (downscale) some images the way that Facebook does it. ImageMagick, but hey, I'm open for suggestions :)
I believe Facebook is doing this:
Say you have a max width x height of 250x200, Facebook is optimizing the use of this. Tries to use as much of the 250x200 as possible. If for instance you sca... | stackexchange/codereview |
I have been stumbling through some different steps to do this. I ran the qt3to4.exe on the files with compile errors and got though a lot of conversion steps, however now I am getting this error:
1>c:\qt\4.7.0\src\qt3support\widgets\q3toolbar.h(64) : error C2039: 'ToolBarDock' : is not a
member of 'Qt'
and 55 other s... | stackexchange/codereview |
How can I combine both of these arrays and if there is duplicates of an array have only one represented using PHP.
Array
(
[0] => 18
[1] => 20
[2] => 28
[3] => 29
)
Array
(
[0] => 1
[1] => 8
[2] => 19
[3] => 22
[4] => 25
[5] => 28
[6] => 30
)
| stackexchange/codereview |
How can I drag a marker on the map?
How to handle it in onTouchEvent()?
I had written one code that actually drags. But it feels like the map is moving instead of the marker. That code is written below:
public boolean onTouchEvent(MotionEvent event, MapView mapView) {
/*Action to be taken on ACTION_UP(value=1) and ... | stackexchange/codereview |
I am working on layout in android XML in which I would like to set a buttons height to match it's width when setup to fill parent. Obviously this number will change based on screen size, so I cannot use a set pixel size. Can someone help me with getting the button width based on screen size and then passing that to t... | stackexchange/codereview |
I have a set of nested DIVs that slidetoggle using jQuery as the user clicks on them.
Inside the innermost DIV there is an anchor tag with an HREF that should navigate somewhere.
The problem is that when I click on the link it slidetoggles just like the parent DIVs instead of navigating to the url.
If I right click the... | stackexchange/codereview |
I implemented the following Silverlight app after seeing this instructions, here's my code:
public partial class MainPage : UserControl
{
private Point lastMousePos = new Point();
private double zoom = 1;
private Point lastMouseLogicaPos = new Point();
private Point lastMouseViewPort = new Point();
... | stackexchange/codereview |
How do you make an event dynamically? Like for example, I'm making a notepad with tab support for practice, and for every new tab, a text box is made dynamically. How can I make an event (TextChanged for example) for these text boxes?
Thanks.
| stackexchange/codereview |
I've been trying really hard (with no success) to generate a touch event in the private "PLAlbumView" class (which is the class where the picture thumbnails are displayed).
I've been trying to do that in order to test an End-To-End scenario on an iPhone application I've been working on that uses the camera.
So far, I h... | stackexchange/codereview |
I'm using JQuery Tools' Scrollable in a fashion very similar to: http://flowplayer.org/tools/demos/scrollable/site-navigation.html
Because of the way I've got it on my page, I need to allow users to click buttons to advance horizontally within each vertical. The current tags:
<a class="prev browse left"></a>
<a class=... | stackexchange/codereview |
I had ddl and I added compare validator to make user choose from DDl.And I set all it,s properties well but when i forget to select ddl the validator apear well but when I selected from ddl The astrics(*) as error text it was still apear although I added it,s property focus on error=true.So please any one help me.
... | stackexchange/codereview |
This is my site: http://chfmm.ru/2 click at the SEAT and chose any seat. FireBug show error (http://s46.radikal.ru/i111/1010/60/1e43ff9e2bc7.jpg).
This photo hosting have 1 crossdomain file (http://www.radikal.ru/crossdomain.xml)
what should I do?
my code:
Security.allowDomain("*");
var context:LoaderCont... | stackexchange/codereview |
For the love of God, I can't seem to get this mod_rewrite working properly. Instead of doing brute force trial-and-error, let me ask here.
I want mod_rewrite rules to apply to ALL domains.
I want mod_rewrite entries in httpd.conf
I want to get rid of this WWW virus (for SEO purposes):
http://www.example.com > http://... | stackexchange/codereview |
I have a c# .net 2.0 winForm with a textbox and a trackbar. The textbox Validating event sets e.cancel if the user clicks the trackbar and the validation fails. I am then left with the cursor in the textbox, but the mouse focus is still on the trackbar so moving the mouse moves the trackbar.
I have tried SetFocus in th... | stackexchange/codereview |
is the proper way to
hg up bugfix # <-- use that branch
hg commit --close-branch
hg up another_branch # <-- use another branch
hg commit --close-branch
hg up default
and now hg heads will only show 1 head? Is this the proper way to close unused branches?
Looks like if we hg up bugfix again and ... | stackexchange/codereview |
There is a SharePoint farm with aroubd 5 web apps. Each web app has numerous site collections and within each site collection there are numerous sites.
Some of the sites in each site collection will on longer be used and when any request comes to the site collection, it needs to be routed to a new SharePoint Url in a d... | stackexchange/codereview |
Check whether a number x is nonzero using the legal operators except !.
Examples: isNonZero(3) = 1, isNonZero(0) = 0
Legal ops: ~ & ^ | + << >>
Note : Only bitwise operators should be used. if, else, for, etc. cannot be used.
Edit1 : No. of operators should not exceed 10.
Edit2 : Consider size of int to be 4 bytes.
... | stackexchange/codereview |
This is very odd and I'm wondering if anyone has any thoughts?
I'm trying to scroll a UIScrollView in response to a button press on the iPad.
If I do:
CGPoint currentOff = scrollView.contentOffset;
currentOff.x+=240;
[scrollView setContentOffset:currentOff animated: NO];
The scroll view jumps to the required positio... | stackexchange/codereview |
I am trying to use the same column to represent a has foreign key to different columns. This is because there could be an arbitrary number of tables to be indexed using this column.
Right now, my idea is to use a small varchar() field to represent which field they are indexing and then check for them my probably sub-qu... | stackexchange/codereview |
Example:
MY NAME IS STACKOVERFLOW
Results in:
MY(new line)
NAME(new line)
IS(new line)
STACKOVERFLOW(new line)
or
Example:
MY-NAME-IS-STACKOVERFLOW
Results in:
MY(new line)
NAME(new line)
IS(new line)
STACKOVERFLOW(new line)
I want to split the line into multiple lines using either a space or dash or whatever it is... | stackexchange/codereview |
What API can I use to format an int to be 2 digits long?
For example, in this loop
for (int i = 0; i < 100; i++) {
System.out.println("i is " + i);
}
What can I use to make sure i is printed out like 01, 02, 10, 55 etc (assuming a range of 01-99 )
| stackexchange/codereview |
Our website was created with Google Apps.
My website URL is http://mydomain.com, which is pointing to http://sites.google.com/a/mydomain.com/.
I want to send email to a registered user.
I am using the Apache Commons jar to send mail to the user.
I get this error message:
Sending the email to the following server failed... | stackexchange/codereview |
I I am looking for a function that merely returns true or false. The function would check if the category archive being queried is a child of a particular parent category. The function would look something like this (similar to the is_category() function):
if(is_child_of_category('3')){ //do something }
if(is_child_of_... | stackexchange/codereview |
I want to get the user name who has launched the given application. For Example if Outlook or IE is launched I need to get the Name of the user who has launched it. This should be generic across all Windows OS . But the solution given below is failing in Windows 2003 user ,in both ADMIN and Standard User.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.