How can I use touchesbegan in a table's cell without having to subclass a whole cell. Something like addTarget..... which is available for a UIButton?
(in vb.net this would be like AddHandler I think)
We're being told that fewer HTTP requests per page load is a Good Thing. The extreme form of that for CSS would be to have a single, unique CSS file per page, with any shared site-wide styles duplicated in each file.
But there's a trade off there. If you have separate shared global CSS files, they can be cached once when the front page is loaded and then re-used on multiple pages, thereby reducing the necessary size of the page-specific CSS files.
So which is better in real-world practice? Shorter CSS files through multiple discrete CSS files that are cacheable, or fewer HTTP requests through fewer-but-larger CSS files?
I'm using the post-receive-email script included with git. (Source is here.) It works just fine, but I want each email to be sent from the author of the commits pushed. How do I do it?
My post-receive file currently looks like this, and I want to customize the from-email-address.
#!/bin/sh
export [email protected]
$(dirname $0)/post-receive-email
Found the following in an Oracle-based application that we're migrating (generalized):
SELECT
Table1.Category1,
Table1.Category2,
count(*) as Total,
count(Tab2.Stat) AS Stat
FROM Table1, Table2
WHERE (Table1.PrimaryKey = Table2.ForeignKey(+))
GROUP BY Table1.Category1, Table1.Category2
What does (+) do in a WHERE clause? I've never seen it used like that before.
I have a dict of lists in python:
content = {88962: [80, 130], 87484: [64], 53662: [58,80]}
I want to turn it into a list of the unique values
[58,64,80,130]
I wrote a manual solution, but it's a manual solution. I know there are more concise and more elegant way to do this with list comprehensions, map/reduce , itertools , etc. anyone have a clue ?
content = {88962: [80, 130], 87484: [64], 53662: [58,80]}
result = set({})
for k in content.keys() :
for i in content[k]:
result.add(i)
# and list/sort/print just to compare the output
r2 = list( result )
r2.sort()
print r2
Does anyone know where I can get documentation on "Lists Web Service" for SharePoint. I tried this link, but it seems that every child link goes to a random page.
http://msdn.microsoft.com/en-us/library/dd587198(office.11).aspx
Last year I heard that Installer Projects were going away and we should be switching to Windows Installer XML. Whatever happened with that?
So you know where I'm coming from, support for TFS-based buil machines is very important to me. I know Installer Projects kinda-sorta work with TFS, but they have issues.
I am using the Jquery Validation plug-in, however i need to add a "custom rule", i have 2 date fields and i need to ensure that the end date is not less than the start date. My problem is how to pass the two fields in as elements.
As i understand u set up a custom function something like this :
function customValidationMethod(value, element, params){ }
But can't see how i could use it with two fields, if anyone has any ideas it would be greatly appreciated.
Hi, I'm looping a two-dimensional array like this:
if (!empty($aka)) {
foreach ($aka as $ak) {
if($ak["lang"]=="es") {
$sptitle=$ak["title"];
}
}
}
Pretty simple. If the array ($aka) is not empty I loop trough it and when it finds that the "lang" index is equal to "es" I just save the "title" value for that index in $sptitle.
The problem is that the array ($aka) contains a lot of information and sometimes there is no "lang" index... and I get this error: Notice: Undefined index: lang.
How can I fix this???
This is a extract of the array to help you understand. Notice that [1] doesn't have a [lang] index but [2] does have:
[1] => Array
(
[title] => The Lord of the Rings: The Motion Picture
[year] =>
[country] => USA
[comment] => promotional title
)
[2] => Array
(
[title] => Señor de los anillos: La comunidad del anillo, El
[year] =>
[country] => Argentina
[comment] => Chile, Mexico, Peru, Spain
[lang] => es
)
Thanks!
I've been developing websites for over a decade now, but quickly found that many of my habits in developing for the web are useless when developing for email clients. This has caused me an enormous amount of frustration, so I thought I would ask a question that would hopefully surface the best practices and necessary considerations for others like myself who may find themselves designing for gmail, outlook, etc. from time to time.
Example: <style>...</style> vs inline CSS.
In short: what transfers over from the web-world to the email-world, and what doesn't.
Hi!
I need to retrieve the name, email and picture from a google account.
I am already using the openid to make the user login with it's google acc.
Can I have the picture URL from the openid proccess?
with OAuth I cant'seem to find the right scope to retrieve this information... See this link:
http://code.google.com/apis/gdata/docs/directory.html
there is a list of scopes that you can fetch with REST api to google and I didnt't see the one related to the profile.
Btw, I am using PHP and the openid is already working, but didn't start with the oauth untill I know if I can(and need) retrieve the picture (because email and name already comes within the openid proccess)
thanks,
Joe
Not sure I fully understand what phpmyadmin does.
I created a database in phpmyadmin, and would now like to start accessing the data in it from php. However I have no idea where the database is?
Should I export in the phpmyadmin software? I tried that but it came up with a .sql file which can be opened in notepad and contains the SQL statements used to create the datbase and the one table inside. Basically that doesn't look like a database to me.
How would I programatically access a SharePoint document library from another machine? I want to recursively scan all the folders and generate a list of files with a certain custom property.
The alerts that I setup for source code changes isn't being triggered. I suspect that the email server settings are wrong, but where would I configure them?
Hi there
I am not sure if the title has the correct terms, I have a developer and am very new to cubes.
I have a cube which has data associated to materials that are broken down into chemical compounds.
For example a rock material has 10% of this chemical and 10% of that chemical, etc. Samples are taken daily and sample is a dimension with date, etc.
So, the measure needs to average by the sample dimension but needs to sum across the chemical compound dimension (To add up to 100% for example).
Is this at all possible?
I recently installed PHP on IIS/Windows 7, but it isn't working. I am getting the entire source file in the browser window.
FastCGI Settings shows c:\Program Files (x86)\PHP\php-cgi.exe
Handler Mappings has
Request Path: *.php
Modue: FastCgiModule
Executable: C:\Program Files (x86)\PHP\php-cgi.exe
Request Restrictions: File or Folder, All verbs, Script Access
Hi,
I've got a problem when I'm calling a static var from another class. I get this pretty syntax error where php is unexpected the '.'
Here is where I'm calling it :
private $aLien = array(
"menu1" => array("Accueil","statique/".Variable_init::$langue."/accueil.html",0,0), //This line
"menu2" => array("Infos Pratiques","statique/".Variable_init::$langue."/info.html",0,0),
"menu3" => array("Faire une réservation","statique/".Variable_init::$langue."/reserver.html",0,0),
"menu4" => array("Pour Nous Joindre","statique/".Variable_init::$langue."/nousJoindre.html",0,0),
"menu5" => array("Plan du site","statique/".Variable_init::$langue."/plansite.html",0,0)
);
And here is my static var declaration from another class:
class Variable_init implements iVariable_init{
public static $langue;
public static $id_choix;
public static $id_contenu;
Hi, i don't know about regular expressions, I asked here for one that:
gets either anything up to the first parenthesis/colon or the first word inside the first parenthesis. This was the answer:
preg_match('/(?:^[^(:]+|(?<=^\\()[^\\s)]+)/', $var, $match);
I need an improvement, I need to get either anything up to the first parenthesis/colon/quotation marks or the first word inside the first parenthesis.
So if I have something like:
$var = 'story "The Town in Hell"s Backyard'; // I get this: $match = 'story';
$var = "screenplay (based on)"; // I get this: $match = 'screenplay';
$var = "(play)"; // I get this: $match = 'play';
$var = "original screen"; // I get this: $match = 'original screen';
Thanks!
https://docs.google.com/viewer is awesome, but there are some customizations I need to make, and documentation would be helpful. Discovered here http://googlesystem.blogspot.com... . Haven't seen any public documentation that would help.
http://code.google.com/apis/documents/overview.html covers the Google docs - where the above is more a clone of the Google Books previewer http://books.google.com/books .
When running the following code I get no output but I cannot work out why.
# include <stdio.h>
int main()
{
fputs("hello", stdout);
while (1);
return 0;
}
Without the while loop it works perfectly but as soon as I add it in I get no output. Surely it should output before starting the loop? Is it just on my system? Do I have to flush some sort of buffer or something?
Thanks in advance.
As a personal hobby I am looking to build an online audio mixer where I can upload individual instrument tracks, control individual volumes of each track, and export the mixed down version. I've been trying (and have come pretty close) with javascript. I really would like to stay away from flash if possible, but I'm really looking for suggestions for technologies to try. If anyone has any suggestions on languages that are good at stuff like this or libraries that I am missing, please let me know!
I have a test environment that I have been using:
http://driverstestpractice.com/sandbox
Currently all tracks on the site are set to the click track in order to test the track sync (which as you can tell is a little off)!
Thanks!
I'm trying to use an if statement to work out which of 2 strings comes first alphabetically. Like with numbers and greater and less than:
if (1 < 2) {
just with strings:
if(@"ahello" < @"bhello") {
Or would I have to have a string containing all the letters and then check the index of the first char in each string and see which index is greater, and the index that is less than the other comes first in the alphabet and then if they are equal move on to the next char and repeat?
What caching libraries would you consider to be the most important or useful for .NET?
I'm asking because I need to contact them to see they plan on supporting .NET 4.0's caching framework.
The select() and pselect() system calls modify their arguments (the 'struct fd_set *' arguments), so the input value tells the system which file descriptors to check and the return values tell the programmer which file descriptors are currently usable.
If you are going to call them repeatedly for the same set of file descriptors, you need to ensure that you have a fresh copy of the descriptors for each call. The obvious way to do that is to use a structure copy:
struct fd_set ref_set_rd;
struct fd_set ref_set_wr;
struct fd_set ref_set_er;
...
...code to set the reference fd_set_xx values...
...
while (!done)
{
struct fd_set act_set_rd = ref_set_rd;
struct fd_set act_set_wr = ref_set_wr;
struct fd_set act_set_er = ref_set_er;
int bits_set = select(max_fd, &act_set_rd, &act_set_wr, &act_set_er, &timeout);
if (bits_set > 0)
{
...process the output values of act_set_xx...
}
}
My question:
Are there any platforms where it is not safe to do a structure copy of the struct fd_set values as shown?
I'm concerned lest there be hidden memory allocation or anything unexpected like that. (There are macros/functions FD_SET(), FD_CLR(), FD_ZERO() and FD_ISSET() to mask the internals from the application.)
I can see that MacOS X (Darwin) is safe; other BSD-based systems are likely to be safe, therefore. You can help by documenting other systems that you know are safe in your answers.
(I do have minor concerns about how well the struct fd_set would work with more than 8192 open file descriptors - the default maximum number of open files is only 256, but the maximum number is 'unlimited'. Also, since the structures are 1 KB, the copying code is not dreadfully efficient, but then running through a list of file descriptors to recreate the input mask on each cycle is not necessarily efficient either. Maybe you can't do select() when you have that many file descriptors open, though that is when you are most likely to need the functionality.)
There's a related SO question - asking about 'poll() vs select()' which addresses a different set of issues from this question.
I have various php files which data is Posted to (like the password when the user signs in) How can I can I post to these php from vb.net (a desktop application that is Windows Forms, this is not about ASP.net)
thanks