Is there any way to fit in 1 line using the pipes the following:
output of
sha1sum $(xpi) | grep -Eow '^[^ ]+'
goes instead of 456
sed 's/@version@/456/' input.txt > output.txt
Hi,
I have the following drawable which draw a rectangle. Can you please tell me how can I add a 9patch image as the background of this drawable?
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
>
<stroke android:width="1dp" android:color="#FFFFFFFF" />
<solid android:color="@android:color/transparent"/>
</shape>
Thank you.
Hi all,
Does anyone here know how to set up a pager_query() to automatically go to the last page of the query when the page is displayed? I'm using theme_pager() to format the page.
Suppose I have this class:
public class GroceryListItem()
{
public GroceryList { get; private set; }
public GroceryListItem(GroceryList groceryList)
{
GroceryList = groceryList;
}
}
What is the NHibernate mapping file access strategy for this scenario? (i.e. <one-to-many name="GroceryList" column="XXX" access="?????" />)
Hi,
In android, is there such a thing for listening if a View is pressed?
In background drawable, i can set assert depends on the view is pressed or not.
Is it possible for me to add a Listener for a View when I pressed it?
Thank you.
Hi,
Can you please tell me how can I setHeight for a ViewGroup?
I see there is a layout(l,t,r,b);
But that is different form setHeight(), since I don't know where should be the top/bottom of the viewGroup. I need to set the height of the ViewGroup and return that to ListAdapter.
Thank you.
<?php
namespace default
gives me an unexpecected T_DEFAULT, is there any way of working around this? Can I escape the reserved word somehow?
My system uses the name of the current module in my site for the namespace so it would be nice to be able to use any string as a namespace.
What is the most efficient way to start learning develop Facebook applications? Any web resource or book that you would recommend to start from? Any MUST READ or Bibles available for this? There are plenty of them in Amazon, but which one really worth to spend time?
What kind of development technologies are used in this? Is PHP/MySQL/JS enough to jump in?
Thanks
Below is some PHP code that i have written, the problem occurs when it gets to the use of the num_of_rows(), it just does not seem to work and i cant figure out why?
<?php
try
{
$divMon_ID = array();
$divMon_Position = array();
$divMon_Width = array();
$divMon_Div = array();
$db = new PDO('sqlite:db/EVENTS.sqlite');
$result_mon = $db->query('SELECT * FROM Monday');
$totalRows = mysql_num_rows($result_mon);
//for($counter=1; $counter<=10; $counter+=1)
//{
//<div id="event_1" style="position:absolute; left: 0px; top:-39px; width:100px; font-family:Arial, Helvetica, sans-serif; font-size:small; border:2px blue solid; height:93px">
//$divMon_ID[]=$row['Id'];
//$divMon_Position[]=$row['Origin'];
//$divMon_P[]=$row['Position'];
//}
}
catch(PDOException $e)
{
print 'Exception : '.$e->getMessage();
}
?
I know that it is the "$totalRows = mysql_num_rows($result_mon);" statement because when i then comment it out, the page can load.
Am i using the function in the wrong way?
Thanks.
Hello,
I have come across lots of code which will find all the links on a page. I would like something that takes it a step further and finds it for the whole site.
Spidering the links is a little trickier than in seems!
Any idea will be greatly received.
I usually use a classes destructor method __destruct() to persist objects to session or what have you. It is just very convinient, but I'm curious to if there are any other methods that are equally appealing. Do you know of such?
The curiousity arose as I was to merge/utilize two frameworks that both made use of __destruct() for persistance resulting in a race-problem.
Is there any way to tell sed to output only captured groups? for example given by input:
This is a sample 123 text and some 987 numbers
and pattern
/([\d]+)/
I could get only 123 and 987 output in the way formatted by back references perhaps?
Please lead me in the right direction.
I need to provide user with small text centered on the iPhone screen. User can make quick scroll left or right in order to get the next or previous text. There can be hundreds of such text pieces. The process itself is similar to Photo application sidescrolling but much simple, no zoom.
As far as I can understand I need to use UIScrollView class, then call hundreds of addSubviews?
Is it the optimal way or I should always keep 3 subviews and replace them on the fly?
What kind of tricks should be used to achieve the "scroll and center" effect?
Thanks
How to create continuously scrolling view (by quick scroll) like in camera roll? Instead of images there should be text in the view generated dynamically. Which views/controllers I have to use?
The scrolling itself can be either originated by user or each designated period of time.
Hi,
I have a text view. I would like to add a 'vertical line' on the left side of the TextView to act as a separator.
Is there a way to do that?
Thank you.
I'm trying to generate a username using a single name field in excel which has the person's first name and last name. I'm open to what the username would be, as long as its intuitive for the user. The name fields can be tricky, as the data looks like this:
Albert Abongo (2 names)
Stephen Michael Essuah Ackah (4 names)
Alhaji Iddrisu Abdul-KArim (3 names)
I guess my ideal usernames for these people would be
aabongo
sackah
aabdul-karim
Hi,
I need a binary/script (php) that does the following.
Start n process of X in the background and maintain the number processes.
An example:
- n = 50
- initially 50 processes are started
- a process exits
- 49 are still running
- so 1 should be started again.
Please, this is urgent.
Thanks!
Michael
I'm about to buy an iTouch, mainly because of the iCal. I'm a Windows user, so does anyone know if these two play well together? I'd prefer to be able to update my calendar from either the computer or iTouch and sync.
I've searched Google, but I'm sceptic so far. Any experiences, knowledge you can send my way would be appreciated (and possibly save me money).
Thanks
Michael
Has anyone ever ran across a program that in a generic manner will execute a sql query and then based on criteria email out alerts. Going to create such a framework but don't want to re create the wheel if I don't have to. It could be used to check various things like if things are setup correctly inside our ERP etc...
Thanks for any thoughts.
Michael
Hey all,
I am looking for a CDN service that is able to update the end point files on demand via API in max time of 10 min. or an expiration time for the files that is 10 min or less.
In addition the CDN must have an option to upload files via API (working with PHP in my project).
thanks in advance
michael D
If I'm hosting an app in NY, what kind of delay can I expect for a user to get a single packet if they're in Australia, i.e. roughly the maximum distance from NY?
I'm looking for the maximum latency I'm likely to encounter on a regular basis -- if Australia's not the right destination point to consider, feel free to substitute another point.
Thanks!
Michael
Hi
I need to sum 9 cells of data, each one on a separate sheet, but always in the same location. I only want a figure returned when all the cells have data, even if it's a 0. But, if one of the cells is blank I want a blank return.
I'm trying to get my head around, making it up actually, where the IFs and ISBLANK and SUMS would go. Any pointers would be greatly appreciated.
SUM(IF(ISBLANK(RANGEA,OR(RANGEB),0,ALLRANGES)))
Many thanks
Michael
We're running a Ubuntu Server VM with OpenCPU (that's an API for R).
Unfortunately we're unable to get the Cairo R package to play, the error message (from within R) is as follows:
unable to load shared object
'/usr/lib/R/library/grDevices/libs//cairo.so': /usr/local/lib/libgmodule-2.0.so.0: undefined symbol: g_rec_mutex_lock 2: In png() : failed to load cairo DLL
We've tried purging and reinstalling cairo and libcairo and we both tried building the Cairo R package from source as well as using a precompiled version from Michael Rutter's ppas (all seems to work without errors).
Unfortunately none of us are real Ubuntu natives and thus we probably did some pretty amateur debugging. Any push in the right direction would be very appreciated. For example, we couldn't figure out how to reinstall whatever libgmodule refers to.
Here is the latest in my link-listing series. Also check out my VS 2010 and .NET 4 series and ASP.NET MVC 2 series for other on-going blog series Im working on. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] ASP.NET MVC How to Localize an ASP.NET MVC Application: Michael Ceranski has a good blog post that describes how to localize ASP.NET MVC 2 applications. ASP.NET...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.