instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
So I'm working with an installation, and have files in my wp-content/uploads folder. I want to prevent people from navigating to it directly, or accessing it at all (including videos called in a podcast), unless they are logged into the site.
It this a simple htaccess thing? I'm not even sure where to start.
| stackexchange/codereview |
Let's assume we have a model:
public class Document
{
public string Name { get; set;}
public List<DayOfWeek> WeekDays { get; set; }
}
Is it possible to render checkboxes that represent days of week for that model?
I've searched the internet but did not find any solution.
I mean it works whith CheckBoxFor(mode... | stackexchange/codereview |
I have a error in production that is built with 2 web servers against a common SQL-server database.
I have one root entity with a ISet of Value Objects.
The mapping looks like this.
mapping.HasMany(x => x.DayInfos)
.Access.CamelCaseField(Prefix.Underscore)
.Table("WeeklyMailDayInfo")
... | stackexchange/codereview |
I have something like the following
class A
def initialize
@var = 0
end
def dosomething
@var+=1
end
end
class B < A
def initialize
super
end
def func
puts @var
end
end
The problem is when I call
a = A.new
a.dosomething
b = B.new
the value which @var returns is 0 how would I chan... | stackexchange/codereview |
I am trying to integrate twitter (using Twitter4j) into my android app and I have few concerns/questions:
I want to retrieve tweets that have certain #hashtag, for example #sxbsw2011.
Here is the code that I am currently using:
Query query = new Query("#sxsw2011 since:2010-11-21");
QueryResult result = twitter.search... | stackexchange/codereview |
I am having a problem with a setting the enabled state of a button on a Dialog. The button in question is defined as:
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)">
<Condition Action="disable">Validated = 0</Condition>
<Condition Action="enable"><![CDA... | stackexchange/codereview |
On this page in the right column are
four nav items. The first nav item "The Baltimore Orioles," onmouseover shows 3 sub nav items.
How do I get rid of onmouseover and have it show the 3 sub na only when user clicks? I added onclick to the script but no luck.
| stackexchange/codereview |
My goal is pretty straightforward: I want to generate an HTML table with the headers showing the column names of a MySQL table and the body showing the contents of that MySQL table. I'm trying to make this as efficient as possible using loops - the headers were a piece of cake:
$columns = mysql_query("SHOW COLUMNS FROM... | stackexchange/codereview |
I have the following:
"SELECT * FROM pages WHERE parent=0 ORDER BY `sort` ASC"
There is a bug somewhere in the system I am working with which means that a page can have a lower sort value than the home page. I am currently looking into this, in the meantime i need the query to enforce that home page comes out first.
C... | stackexchange/codereview |
Please help me figure out why the second event is not started (full code)
<input type="submit" value="disabled:false" />
$(function(){
$('input:submit').bind({
mouseover : function(){
$('input:submit').each(function(){
$(this).attr('disabled', 'disabled');
$(this)... | stackexchange/codereview |
For giggles, I'm creating an image free, but interacting website. On the menu, I want each item to fade to gray on mouseover, and then fade back to white on mouseout. Currently, all of the menu items fade in unison. For many who inspect my code, you'll surely see why in quick time. I'm just too new to it.
Link to site:... | stackexchange/codereview |
Could yo please tell me whether you know some approach to achieve this ?
I thought abouy delete all from syscomments but it seems to be more info there..
Thanks a lot in Advance.
| stackexchange/codereview |
I had a web page in which the user specify an username and a password to make queries to a third site. In Firefox and Chrome I can make an URL of the form http://user:password@example.com, but Internet Explorer 7 says that it can not find the address.
Is there any form of setting user and password in the URL for Intern... | stackexchange/codereview |
Let's say I have following classes in my app.
MainWindow.xaml.cs
public partial class MainWindow : Window
{
public SolidColorBrush Brush { get; set; }
public MainWindow()
{
InitializeComponent();
Brush = new SolidColorBrush(Colors.AliceBlue);
}
private void Button_Click(object sen... | stackexchange/codereview |
In my web application one model uses identifier that was generated by some UUID tool. As I want that identifier to be part of the URL I am investigating methods to shorten that UUID string. As it is currently is in hexadecimal format I thought about converting it to ASCII somehow. As it should afterwards only contain n... | stackexchange/codereview |
I have a folder that has a bunch of files such image_hello.png, helloworld.png, wired.png. I would like to copy these files and then rename them as 1.png, 2.png, 3.png via script or batch file
I am not sure what the best way to start this is, i can copy over the files easily, but after that, i am not sure how to rename... | stackexchange/codereview |
Am I correct assuming that all functions (built-in or user-defined) belong to the same class, but that class doesn't seem to be bound to any variable by default?
How can I check that an object is a function?
I can do this I guess:
def is_function(x):
def tmp()
pass
return type(x) is type(tmp)
It doesn't seem n... | stackexchange/codereview |
I built a Wordpress child theme based on Thematic framework and edited some template files. When I upgraded to a new version of Thematic all changes to my template files were lost.
I guess it makes sense but that makes me a little disappointed in the child theme concept...
So if I understand correctly, there's no way t... | stackexchange/codereview |
I'm playing around a little with dividing up a MVC-site into several assemblies (ran into some issues earlier).
Now I have almost everything working, got the main MVC project that loads in any external assemblies it can find. The external assemblies are basically external areas. When I had it copy the Views and web.con... | stackexchange/codereview |
I have a node called Dealer that has the following CCK fields;
Title
Body
Location (of type Location)
Phone (of type text)
Website ( of type text)
Divsion (Node Refrence)
Is there a way to display the location of the node on a gmap, based on the inputted location? I'll be importing around 1000 nodes, and don't have t... | stackexchange/codereview |
I'm not entirely sure how best accomplish this multi-threading scenario so any input would be appreciated.
I have one block, that reads data, that several threads can access at once. I have another block that writes data, only one thread can write at any time. Also it can't start writing as long as any thread is readi... | stackexchange/codereview |
have two line segment in the space, how to construct a surface with two line segment as the boundary?
| stackexchange/codereview |
I am trying to send a simple HTML email thru SQL stored procedure.
Is it possible adding a image such as company logo for the email result?
This is a part of stored procedure.
/*Create HTML*/
SET @TableHTML =
N'<H4>Production Alert (' + CONVERT(VARCHAR(10),GETDATE(),101) + ')</H4>' +
N'<table border="1">' +
... | stackexchange/codereview |
I am building a visual studio 2010 Add-in for internal use in my company. I would like to customize the main window caption to display the name of the current start up project. I can set the caption of the main window with the following code:
DTE d = GlobalClass.dte2 as DTE;
IntPtr hWnd = new Syst... | stackexchange/codereview |
Is monkeypatching a good development practice? When should I monkeypatch rather than, say, fork a gem and make the patch on the forked project?
| stackexchange/codereview |
I need to reformat the function below in the form of an jQuery.ajax call in order to do error handling (the script is apparently timing out on some calls). What would this look like if converted to .ajax() with an error callback and a success callback?
jQuery.getJSON("http://boss.yahooapis.com/ysearch/web/v1/tobacco"
... | stackexchange/codereview |
In the interest of browser-compatibility checking, and given limited resources, is it worthwhile to test my HTML 4/CSS 2 web applications and sites with older versions of Firefox, or is it sufficient to test with the current version (v3.6 as at the time of writing)?
If I need to test against older versions, why? What a... | stackexchange/codereview |
My issue can be seen here: http://jasonnarciso.com/dev/cmwd/concrete-solutions/
Basically I have a very simple jquery script in place that shows a div when the .item element is hovered. Works fine, but on the left and bottom containers, the div gets cut off.
Obviously this is a z-index issue, but I'm wondering if I sh... | stackexchange/codereview |
I'm new to Unity Dependency Injection and have a question thats probably very straight forward..
I would like to register type mappings based on configuration pulled from my database model. How and what's the best way to do this?
For example would I do something like this?
myContainer.RegisterType<IMyType, /*My dynamic... | stackexchange/codereview |
I have a .NET Winforms app written in C# which works everywhere but on one particular machine. On that machine it dies without ever starting. There is no error message, but the following is written to the event log:
Type: Error
Source: .NET Runtime 2.0 Error Reporting
Description: Faulting application myapp.exe, ver... | stackexchange/codereview |
java.net.ConnectException extends java.net.SocketException
If I do the following, will it cater for both exceptions? ie if I catch a "parent" exception using instanceof, does that include any subclassed exceptions?
catch (Exception e)
{
if (e instanceof java.net.SocketException)
{
System.out.println("You've... | stackexchange/codereview |
what is the best way to find out how much time an oracle select statement takes. I have the following query for which I want to find out the time, however, since this query brings four thousand records and it takes time to display those 4 thousand records on the screen, the elapsed time stated might not be correct.
Is... | stackexchange/codereview |
I have developed an asp.net control that inherits from the gridview and its called gridviewex... i need some page navigation stuff to render underneath it for some custom paging that i am implenting.. All going well but i can't seem to add new controls to the controls..
For example what i wanted to do is add a asp.net ... | stackexchange/codereview |
For example i have
public class Person
{
public int Id {get;set;}
[Required()]
public string Name {get;set;}
[Required()]
public Address Address {get;set;}
}
And
public class Address
{
public int Id {get;set;}
[Required()]
public string City {get;set;}
[Required()]
public strin... | stackexchange/codereview |
This code does not run properly, but it suggests what I am trying to do:
function sort_2d_by_index($a,$i) {
function cmp($x, $y) {
// Nested function, can't find $i
// (global $i defeats the purpose of passing an arg)
if ($x[$i] == $y[$i]) { return 0; }
return ($x[$i] < $y[$i]) ? -1 : 1;
}
usort(... | stackexchange/codereview |
I want my users to be able to specify their locations so that I can plot them on a map. Given an address, I use Google Maps API to get their lat/long coordinates and store that in the database.
Additionally, I want to allow users to search for other users based on location. Using Google Maps API, I can also get, say, c... | stackexchange/codereview |
I have written a utility that monitors for Unhandled Exceptions and then creates a minidump in the event that one happens.
Is there a way, when the event triggers, rather than having the standard messagebox displaying the unhandled exception, could I disable that and display my own with different information?
Thanks.
| stackexchange/codereview |
So I'm going through Accelerated C++ and am somewhat unsure about iterator invalidation in C++. Maybe it's the fact that it is never explained how these iterators are constructed is the problem.
Here is one example:
Vector with {1,2,3}
If my iterator is on {2} and I call an erase on {2} my iterator is invalid. Why? In ... | stackexchange/codereview |
I am using EF 4 to retrieve a list of Employees.
public ContentResult AutoCompleteResult(string searchText)
{
List<Employee> list = Employee.GetAllCurrentEmployees();
List<Employee> filteredEmployees = list
.Where(x => x.GetName().ToLower().Contains(searchText.ToLower()))
.ToList();
JavaScr... | stackexchange/codereview |
I'm looking for a source control system that I can use for personal projects. I have two laptops and a desktop I develop on and a flash drive for portability. Rather than keeping all my code on my flash drive I want to check it out / in on the machine I'm working on at the time.
I'm specifically looking for something f... | stackexchange/codereview |
I have an array of objects. In this array, there are duplicate values. I would like to find the duplicates in the array, place them in a new array, remove the original, and then get print out information from the first array where the key from the new array is the same.
For instance:
Array 1
[0]
[0] => ID: 123
... | stackexchange/codereview |
This script takes text, looks for urls, colors those and makes a png image. The problem I am having is with wordwrap. Since I have to break the text apart and put it back together to color the links, I am having a hard time figuring out how to wrap the text. Here is the script and an image of the results.
// Matches u... | stackexchange/codereview |
Hi
I have a scenario where I need to convert the default Charset should be overridden bu UTF-8. I am using below class. But I am not getting the expected output. Because I use a unix system that has default UTF-8 as charset and I compare the results there. Am I wrong somewhere in this program?
public class CharsetDisp... | stackexchange/codereview |
I want to show image of contacts(form contact list) in my application. How to do it?
| stackexchange/codereview |
In my iPhone app, I have requirement to search the SQLite database.
I will search the similar data on the basis of what the user enters into the textbox.
What I want:
I want query like
Select category from categorytable where category like 'A%', if user enters A
I tried
NSString *query = [NSString stringWithFormat:@"Se... | stackexchange/codereview |
Working on troubleshooting an interface consumed by 3rd parties. The quick overview:
3rd party sends the user out our site example.com/login to let the user authenticate with us
After signin we redirect the user back to thirdparty.com
thirdparty.com consumes a dynamic JS file on our site used to return information ab... | stackexchange/codereview |
I'm trying out Spring and I've met the filter-mapping tag. What is its role when compared to the servlet-mapping tag? Is it executed in the background when the urls are called?
| stackexchange/codereview |
I would like to send an email with an Intent.
I would like to programatically open up an dialog that shows the different programs that handle this Intent and lets the user show his favourite mail program. In the program I want to specify a Title, an receiver and a message body.
Could you give me an example on how to t... | stackexchange/codereview |
This is a Java syntax question, but just for some background.
Using android, I created a small app that went really slow and often crashed because when a button was clicked the onClick() method changed button images for various buttons. It was really clunky and slow and I found out after a search on the net that the pr... | stackexchange/codereview |
When I have my laptop docked, I like to have Visual Studio and it's sidebar windows spread across 2 monitors, so that I can have a maximized code view and all the supplementary windows over on the second monitor. When I undock my laptop to work on the go, I obviously lose the 2 monitor advantage. However, switching b... | stackexchange/codereview |
What exactly is this line of code doing in vb6?
If StrConv(Dir(FilePath & strArray(ArrayCounter)), vbUpperCase) <> StrConv(strArray(ArrayCounter), vbUpperCase)
It seems like its comparing the exact same thing here...
Filepath is just a string with a directory name in it
| stackexchange/codereview |
I have started work on a little programming project basically a web based invoicing program . I will want it to be usable from smart phones.
I have decided on the back end which is Perl - Dancer- Moose - Kiokudb which I'm pretty happy with for now (Yes I know there are some around already).
I am now trying to mak... | stackexchange/codereview |
Does anyone know how I can make a user interface where the person uploads an image and the image is displayed on the screen?
Sort of like facebook or flickr uploads or something.
| stackexchange/codereview |
How can I create an NSDate from the day, month and year? There don't seem to be any methods to do this and they have removed the class method dateWithString (why would they do that?!).
| stackexchange/codereview |
What I want to get is a XSLT template to turn several XML element values into a coma separated string to be the value of a single output element.
I have found several examples in tutorials to do so for text output, but nothing for XML output.
Sample input:
<People>
<Person>John</Person>
<Person>Paul</Person>
... | stackexchange/codereview |
I have written an activity that has 2 image buttons (1 for messaging and another for browser). On click on each will start messaging and browser android activities respectively.
My question is: whenever I start my app and click on any of the buttons say browser button for example, and after it starts the android browse... | stackexchange/codereview |
I was going to use the Polymaps.org library (combined with Protovis) to create a nice vector based world map. However, there example (http://polymaps.org/ex/world.html) uses a GeoJSON from Thematic Mapping, but the countries are coded by name instead of by their 2 digit country codes.
When I pair up my data, I have ... | stackexchange/codereview |
I am trying to save the form onkeyup action. I am new to jQuery.
Is this possible?
I appreciate any help.
edit 1:
Save the form means save to server. Is there a way to add 0.2 seconds delay.
| stackexchange/codereview |
Possible Duplicate:
Reading svg file through Java
i want a sample program for reading a svg file and displaying its content
| stackexchange/codereview |
I am seeing abnormal behavior in datagrid when the item source is very large list(>4000) like the columns are disappearing while scrolling horizontal scroll bar and even extra column(i mean repeated columns) are appearing rather than specified.
Here is my xaml code.
<TK:DataGridTextColumn Header=" Date" Binding=... | stackexchange/codereview |
Just reading the msdn article on overriding equality operators here
The following snippet confuses me...
// If parameter cannot be cast to Point return false.
TwoDPoint p = obj as TwoDPoint;
if ((System.Object)p == null) // <-- wtf?
{
return false;
}
Why is there a cast to Object here to perform the null compariso... | stackexchange/codereview |
I am trying to apply Copy to clipboard to my website, but there seems to be a bug because the text is not getting copied on my website.
Clipboard.swf : Using this for copying
My website: FileLnx (please upload then click on a text field for copy)
| stackexchange/codereview |
I have a visit table (visit_table), structure:
ID
IP_address
timestamp
and a table (country_table) with country names for IP ranges
ID
begin_IP (start of IP range)
end_IP (end of IP range)
begin_num (the numerical equivalent of begin_IP, i.e. INET_ATON(begin_IP))
end_num
country_code (e.g. US)
... | stackexchange/codereview |
I have the following code:
<#if !(task.dueDate??)><span class="datetime">Date: ${task.dueDate?string.medium_short!""}</span></#if>
It is supposed to protect from the situation in which dueDate is null but I still get the exception: Expression task.dueDate is undefined
Any ideas on how to solve?
Thanks,
Assaf
| stackexchange/codereview |
i'm new to GWT2.1's Places and Activities.
I'm using the same ActivityMapper as example below and getting laggy button clicks after just a few navigations.
The MVP architecture I'm using has the Presenter create listeners and define the View interface, but View objects are singletons.
Is my problem with lag due to all ... | stackexchange/codereview |
Will any one please give an example, I googled but not found any suitable result.
I want to give flag so that it compress the file with its original name in case of file name
with special characters.for example currently I am using
ZipEntry entry = new ZipEntry(file.FullName.Substring(directory.FullName.Length + 1));
... | stackexchange/codereview |
So I'm adding a form to my J2ME application but always get a nullpointer exception when trying to go back to the main screen. This does not seem to happen when I'm using a canvas, I can successfully go back to the main menu. What gives?
Starting the form from the main midlet
quickAlarm = new QuickAlarm("Set quick alarm... | stackexchange/codereview |
I have a model that contains a property for an image url:
[Required]
[DataType(DataType.ImageUrl)]
public string Logo { get; set; }
As you can see the data type is an ImageUrl and I've usesd this fact to create an editor template in Views/Shared directory.
The template only needs to extened the default template by add... | stackexchange/codereview |
Among GIT ,SVNX & SCM which one is best to use in a small org with 10 to 12 developers ?
Also is there any tutorial available to configure and using of SCM in Xcode?
| stackexchange/codereview |
when i try build-all-load i'm getting errors about models that
doesn't exist any more in my schema. I know in doctrine i can use
clean-model-files but in propel?
This is the error:
PHP Warning: require(lib/model/om/BaseSedii18n.php): failed to open stream: No such file or directory in /home/javier/Aptana_Studio_Worksp... | stackexchange/codereview |
How to select all the child elements within a certain <div> except the active one? For example:
<div>
<a id="1" class="item" href="#">Item 1 </a>
<a id="2" class="item" href="#">Item 2 </a>
<a id="3" class="item" href="#">Item 3 </a>
</div>
<script>
$(function() {
$(".item").mouseover(function() {
... | stackexchange/codereview |
This is the code I'm using now, how do I add the "ignore case" attribute?
DBObject query = new BasicDBObject("prop", value);
Thanks
| stackexchange/codereview |
I have a game class sub class of CCLayer where i declare a int variable gameScore in .h file and initialize/update this variable in .m class.Now I need show this gameScore value in another class when game is over.But i don't know how to do it.Infact i found severarl solution but most of them didn't work for me or i can... | stackexchange/codereview |
I have written the following code:
#include "stdafx.h"
#include <iostream>
using namespace std;
double funcA()
{
return 100.0;
}
int g(double (*pf)())
{
cout << (*pf)() << endl;
return 0;
}
int g2(double pf())
{
cout << pf() << endl;
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
g(&func... | stackexchange/codereview |
I have ejb + JPA app on GF3 server and remote swing client. I want upload large files from client to server's database over stateless session bean.
how to upload large binary data from remote swing client?
| stackexchange/codereview |
I am getting a parsing error and I do not know why (I am new to programing). Because of this error, R.java disappears and I end up having more errors. Hopefully someone can help me out. Here is where the error comes from: list.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.an... | stackexchange/codereview |
I was wondering if it is possible to add additional controls to the WizardNewProjectCreationPage. At this point it only has controls for a project name and location. I would like to keep these and add more to it.
I have seen the createControl method but I'm not sure how I can extend it without losing the controls alrea... | stackexchange/codereview |
I have a shell script that spits out a line as follows:
prog_name -options ...
To be specific, as an example:
prog_name -filter_arg +define BOOST +noconvtest +actuate-long -disp_arg +define size=40 res=30
Please note that there are no quotes above and I do not have control to modify the shell script. [However, I am no... | stackexchange/codereview |
I am currently writing a text file parser for several formats. While the text file is parsed, there are different kinds of operations to do. I am trying to do something clean using OOP.
Here is where I am stuck :
abstract class Parser
{
abstract protected function DoSomeStuff($data);
public function Parse($sr... | stackexchange/codereview |
string is "Lorem, ipsum 12 dolorem, si amet 58,14" and etc. I need to extract "12" and "58,14". I have no experience with regular expresions. So the question is - how should I do this? :)
Language (if this matters) is php5.
| stackexchange/codereview |
I'am more a sysadmin and a webmaster than a developer, but sometime I develop, including C# principally using Winform (and optionally GTK+).
I've started few weeks ago a WPF project, and it seem really powerful, but at start I feel like a hen who found a knife! There is so many difference!
stackoverflow abounds about t... | stackexchange/codereview |
I have a WriteableBitmap which loads the bitmap image from file(mostly bmp). The bitmap files I am using have different pixel formats such as Indexed8, Bgra32, etc etc. The problem is that my code only works for bgra32 pixel format. So I need help in converting the bitmaps to Bgra32 pixel format in c# wpf.
Thanks
| stackexchange/codereview |
I am trying to add two numbers together from EditText fields. So far I have the code below that I believe converts the EditText field 'pos1_deg' & 'pos2_deg' into integers deg1 & deg2.
deg1 = Integer.parseInt(pos1_deg.getText().toString());
deg2 = Integer.parseInt(pos2_deg.getText().toString());
I could then do the fo... | stackexchange/codereview |
Hay, In Plesk it gives me the ability to add a subdomain to a domain say x.y.com, the problem is that www.x.y.com gets treated as another subdomain. Is there a way to direct all traffic from www.x.y.com to x.y.com? I tried doing this in php using the 300 header, but stuff like www.x.y.com/mypage, doesn't get redirected... | stackexchange/codereview |
Is there a difference in the way SQL interprets the logical operators AND and &&?
| stackexchange/codereview |
I'm working on an employee holiday management system and need advise on how to efficiently model the data.
Is there any example or references somewhere that I could learn from.
Regards
| stackexchange/codereview |
Is there an Erlang equivalent of the Java SocketChannel class? Need to be able to handle multiple client socket connections using one Erlang process.
Thanks!
| stackexchange/codereview |
I would like to set environmental variables in bash whenever I use a script in the ~/project/bash folder
currently, to run scripts in this folder, I have to run:
cd ~/project/bash
. ./project/bash/env.vars.sh
first, I would like these variables to be automatically set, preferably when either the scripts are used or th... | stackexchange/codereview |
I am currently implementing and ROA and need a testing tool to test my RESTful web services. Currently, we are using SOAP UI to do so. However, it doesn't appear that SOAP UI supports the HTTP PATCH verb. Does anyone have any recommendations for a tool that supports HTTP PATH?
| stackexchange/codereview |
The callback function in array_filter() only passes in the array's values, not the keys.
If I have:
$my_array = array("foo" => 1, "hello" => "world");
$allowed = array("foo", "bar");
What's the best way to delete all keys in $my_array that are not in the $allowed array?
Desired output:
$my_array = array("foo" => 1);
... | stackexchange/codereview |
What I'm trying to do is to fade in a block which on the CSS is display to none here is what I got:
CSS:
.white_content {
display: none;
position: relative;;
width: 5%;
height: 5%;
padding: 24px;
border: 16px solid orange;
background-color: some;
z-index:1;
}
jQuery
$(function(){
$(... | stackexchange/codereview |
library(ggplot2)
orderX <- c("A" = 1, "B" = 2, "C" = 3)
y <- rnorm(20)
x <- as.character(1:20)
group <- c(rep("A", 5), rep("B", 7), rep("C", 5), rep("A", 3))
df <- data.frame(x, y, group)
df$lvls <- as.numeric(orderX[df$group])
ggplot(data = df, aes(x=reorder(df$x, df$lvls), y=y)) +
geom_point(aes(colour = group)) +... | stackexchange/codereview |
how we will code these structures(Written in C++) in C#
typedef struct
{
USHORT idVendor;
USHORT idProduct;
USHORT bcdDevice;
CHAR szSerialNumber[256];
} FT_USB_UNIQID, *PFT_USB_UNIQID;
typedef struct {
FT_USB_UNIQID usbHWID;
eFtUsbDeviceStatus status;
BOOL bExcludeDevice;
BOOL bSharedM... | stackexchange/codereview |
I have been searching for resources to display a video in OpenGL ES for iPhone. Can't seem to find any sample code for doing so. The only link i found was a blog which speaks of it but does not have a guide on implementing it.
Would appreciate if anyone could point out any resources they know of or guide me of what are... | stackexchange/codereview |
I am trying to re-order the jqgrid rows using only one specific column. Currently, the rows can be re-ordered by any column. I have it setup like below:
jQuery("#list").jqGrid('sortableRows', {
update: function (ev, ui) {
SaveRowSorting();
}
});
But the above code allows... | stackexchange/codereview |
Is there an easy way to determine the sign of a floating point number?
I experimented and came up with this:
#include <iostream>
int main(int argc, char** argv)
{
union
{
float f;
char c[4];
};
f = -0.0f;
std::cout << (c[3] & 0x10000000) << "\n";
std::cin.ignore();
std::cin.get();
return 0;
}
where (c[3... | stackexchange/codereview |
In Ruby 1.9 you can have Fixnum, Float, and Symbol values that are unfrozen or frozen:
irb(main):001:0> a = [ 17, 42.0, :foo ]; a.map(&:frozen?)
=> [false, false, false]
irb(main):002:0> a.each(&:freeze); a.map(&:frozen?)
=> [true, true, true]
I understand the utility of freezing strings, arrays, or other mutable dat... | stackexchange/codereview |
I want to set a file's modification time to the time I got from exif data.
To get the time from exif, I found :
Graphics.Exif.getTag :: Exif -> String -> IO (Maybe String)
To set the file modification time, I found :
System.Posix.Files.setFileTimes :: FilePath -> EpochTime -> EpochTime -> IO ()
Assuming I do find a T... | stackexchange/codereview |
Is it possible to make a whole table as link?
I have a table which displays some statistical data, I wish to add up an additional functionality to this table so that .. when a user clicks on any part of the table, webpage should guide him/her to new page.
| stackexchange/codereview |
Please help me if you know how can record outgoing and incoming call in android
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.