PostId
int64
13
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
3
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-33
210k
OwnerUndeletedAnswerCountAtPostTime
int64
0
5.77k
Title
stringlengths
10
250
BodyMarkdown
stringlengths
12
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
47
30.1k
OpenStatus_id
int64
0
4
2,111,061
01/21/2010 16:51:25
228,372
12/09/2009 22:40:56
65
2
Binary file & saved game formatting
I am working on a small roguelike game, and need some help with creating save games. I have tried several ways of saving games, but the load always fails, because I am not exactly sure what is a good way to mark the beginning of different sections for the player, entities, and the map. What would be a good way of marking the beginning of each section, so that the data can read back reliably without knowing the length of each section?
binary
file
save
game
format
null
open
Binary file & saved game formatting === I am working on a small roguelike game, and need some help with creating save games. I have tried several ways of saving games, but the load always fails, because I am not exactly sure what is a good way to mark the beginning of different sections for the player, entities, and the map. What would be a good way of marking the beginning of each section, so that the data can read back reliably without knowing the length of each section?
0
4,151,950
11/11/2010 06:39:14
412,906
07/23/2010 12:58:52
173
5
Syntax highlighting in JEditorPane in java
I want to perform syntax highlighting in jEditorPane. It allows me to perform single line syntax highlighting but if the XML tag is split into two or more line it does not work. Below is the code i am using for Syntax highlighting. Help me out with this. Thanks..... public class XmlView extends PlainView { private static HashMap<Pattern, Color> patternColors; private static String TAG_PATTERN = "(</?[A-Za-z\\-_0-9]*)\\s?>?"; private static String TAG_END_PATTERN = "(/>)"; private static String TAG_ATTRIBUTE_PATTERN = "\\s(\\w*)\\="; private static String TAG_ATTRIBUTE_VALUE = "[a-z\\-]*\\=(\"[^\"]*\")"; private static String TAG_COMMENT = "(<\\!--[\\w * \\S]*-->)"; private static String TAG_CDATA = "(<\\!\\[CDATA\\[.*\\]\\]>)"; static { // NOTE: the order is important! patternColors = new LinkedHashMap<Pattern, Color>(); patternColors.put(Pattern.compile(TAG_PATTERN), new Color(163, 21, 21)); patternColors.put(Pattern.compile(TAG_CDATA), Color.GRAY); patternColors.put(Pattern.compile(TAG_ATTRIBUTE_PATTERN), new Color(127, 0, 127)); patternColors.put(Pattern.compile(TAG_END_PATTERN), new Color(63, 127, 127)); patternColors.put(Pattern.compile(TAG_ATTRIBUTE_VALUE), new Color(42, 0, 255)); patternColors.put(Pattern.compile(TAG_COMMENT), new Color(0, 128, 0)); } public XmlView(Element element) { super(element); // Set tabsize to 4 (instead of the default 8) getDocument().putProperty(PlainDocument.tabSizeAttribute, 4); } @Override protected int drawUnselectedText(Graphics graphics, int x, int y, int p0, int p1) throws BadLocationException { Document doc = getDocument(); String text = doc.getText(p0, p1 - p0); Segment segment = getLineBuffer(); SortedMap<Integer, Integer> startMap = new TreeMap<Integer, Integer>(); SortedMap<Integer, Color> colorMap = new TreeMap<Integer, Color>(); // Match all regexes on this snippet, store positions for (Map.Entry<Pattern, Color> entry : patternColors.entrySet()) { Matcher matcher = entry.getKey().matcher(text); while (matcher.find()) { startMap.put(matcher.start(1), matcher.end()); colorMap.put(matcher.start(1), entry.getValue()); } } // TODO: check the map for overlapping parts int i = 0; // Colour the parts for (Map.Entry<Integer, Integer> entry : startMap.entrySet()) { int start = entry.getKey(); int end = entry.getValue(); if (i < start) { graphics.setColor(Color.black); doc.getText(p0 + i, start - i, segment); x = Utilities.drawTabbedText(segment, x, y, graphics, this, i); } graphics.setColor(colorMap.get(start)); i = end; doc.getText(p0 + start, i - start, segment); x = Utilities.drawTabbedText(segment, x, y, graphics, this, start); } // Paint possible remaining text black if (i < text.length()) { graphics.setColor(Color.black); doc.getText(p0 + i, text.length() - i, segment); x = Utilities.drawTabbedText(segment, x, y, graphics, this, i); } return x; } }
java
regex
swing
syntax-highlighting
null
null
open
Syntax highlighting in JEditorPane in java === I want to perform syntax highlighting in jEditorPane. It allows me to perform single line syntax highlighting but if the XML tag is split into two or more line it does not work. Below is the code i am using for Syntax highlighting. Help me out with this. Thanks..... public class XmlView extends PlainView { private static HashMap<Pattern, Color> patternColors; private static String TAG_PATTERN = "(</?[A-Za-z\\-_0-9]*)\\s?>?"; private static String TAG_END_PATTERN = "(/>)"; private static String TAG_ATTRIBUTE_PATTERN = "\\s(\\w*)\\="; private static String TAG_ATTRIBUTE_VALUE = "[a-z\\-]*\\=(\"[^\"]*\")"; private static String TAG_COMMENT = "(<\\!--[\\w * \\S]*-->)"; private static String TAG_CDATA = "(<\\!\\[CDATA\\[.*\\]\\]>)"; static { // NOTE: the order is important! patternColors = new LinkedHashMap<Pattern, Color>(); patternColors.put(Pattern.compile(TAG_PATTERN), new Color(163, 21, 21)); patternColors.put(Pattern.compile(TAG_CDATA), Color.GRAY); patternColors.put(Pattern.compile(TAG_ATTRIBUTE_PATTERN), new Color(127, 0, 127)); patternColors.put(Pattern.compile(TAG_END_PATTERN), new Color(63, 127, 127)); patternColors.put(Pattern.compile(TAG_ATTRIBUTE_VALUE), new Color(42, 0, 255)); patternColors.put(Pattern.compile(TAG_COMMENT), new Color(0, 128, 0)); } public XmlView(Element element) { super(element); // Set tabsize to 4 (instead of the default 8) getDocument().putProperty(PlainDocument.tabSizeAttribute, 4); } @Override protected int drawUnselectedText(Graphics graphics, int x, int y, int p0, int p1) throws BadLocationException { Document doc = getDocument(); String text = doc.getText(p0, p1 - p0); Segment segment = getLineBuffer(); SortedMap<Integer, Integer> startMap = new TreeMap<Integer, Integer>(); SortedMap<Integer, Color> colorMap = new TreeMap<Integer, Color>(); // Match all regexes on this snippet, store positions for (Map.Entry<Pattern, Color> entry : patternColors.entrySet()) { Matcher matcher = entry.getKey().matcher(text); while (matcher.find()) { startMap.put(matcher.start(1), matcher.end()); colorMap.put(matcher.start(1), entry.getValue()); } } // TODO: check the map for overlapping parts int i = 0; // Colour the parts for (Map.Entry<Integer, Integer> entry : startMap.entrySet()) { int start = entry.getKey(); int end = entry.getValue(); if (i < start) { graphics.setColor(Color.black); doc.getText(p0 + i, start - i, segment); x = Utilities.drawTabbedText(segment, x, y, graphics, this, i); } graphics.setColor(colorMap.get(start)); i = end; doc.getText(p0 + start, i - start, segment); x = Utilities.drawTabbedText(segment, x, y, graphics, this, start); } // Paint possible remaining text black if (i < text.length()) { graphics.setColor(Color.black); doc.getText(p0 + i, text.length() - i, segment); x = Utilities.drawTabbedText(segment, x, y, graphics, this, i); } return x; } }
0
6,960,144
08/05/2011 17:18:21
360,330
06/07/2010 11:08:45
197
2
C# ticks to datetime and format
How can I convert ticks to datetime and format them to "ss:fff"? My code: timer = new DispatcherTimer(new TimeSpan(0, 0, 0, 0, 1), DispatcherPriority.Normal, delegate { _ticks += 1; DateTime dt = new DateTime(_ticks); this.Show.Text = dt.ToString("ss:fff"); }, this.Dispatcher); It worked properly on mono (I think, I tried something like this and it worked), but it doesn't work on windows. What's wrong?
c#
datetime
null
null
null
null
open
C# ticks to datetime and format === How can I convert ticks to datetime and format them to "ss:fff"? My code: timer = new DispatcherTimer(new TimeSpan(0, 0, 0, 0, 1), DispatcherPriority.Normal, delegate { _ticks += 1; DateTime dt = new DateTime(_ticks); this.Show.Text = dt.ToString("ss:fff"); }, this.Dispatcher); It worked properly on mono (I think, I tried something like this and it worked), but it doesn't work on windows. What's wrong?
0
10,213,097
04/18/2012 15:47:47
422,967
08/17/2010 14:43:35
74
2
How to use a where clause in MVC ef
Using MVC EF, how would I filter results by a field other than the id? return View(db.Drafts.Where(PublicationId=id)); PublicationId is a column in the Drafts table. Any help is appreciated.
asp.net-mvc
entity-framework
null
null
null
null
open
How to use a where clause in MVC ef === Using MVC EF, how would I filter results by a field other than the id? return View(db.Drafts.Where(PublicationId=id)); PublicationId is a column in the Drafts table. Any help is appreciated.
0
6,336,175
06/13/2011 20:49:56
756,339
05/16/2011 20:42:37
45
1
Array of a very long list of ints
I'm trying to solve the 8th problem of the project Euler and I'm stuck because I can't manage to create a very long array of char. There must be a stupid semantic issue, but I'm unable to find it. char cifre[] = "very long list of numbers here";
c
arrays
null
null
null
06/13/2011 21:30:07
not a real question
Array of a very long list of ints === I'm trying to solve the 8th problem of the project Euler and I'm stuck because I can't manage to create a very long array of char. There must be a stupid semantic issue, but I'm unable to find it. char cifre[] = "very long list of numbers here";
1
1,303,803
08/20/2009 03:32:30
17,252
09/18/2008 05:23:23
813
56
WordPress: Assigning widgets to individual pages
Are there any plugins or hacks that allow assigning widgets to individual pages?
wordpress
plugins
widgets
hacks
php
null
open
WordPress: Assigning widgets to individual pages === Are there any plugins or hacks that allow assigning widgets to individual pages?
0
11,064,878
06/16/2012 15:44:33
1,233,517
02/26/2012 07:25:42
1
1
Some good Android Design Resources
I have seen numerous code examples and etc on all technical aspects of Android. However i have tried and yet to find good tutorials on android design. Not "Best practices". But actual code examples of how to implement design features. How to achieve a professional looking design. How to design your UI with fluid animations etc. Anyone got any good technical resources on android design?
android
design
user-interface
null
null
06/18/2012 03:47:48
not constructive
Some good Android Design Resources === I have seen numerous code examples and etc on all technical aspects of Android. However i have tried and yet to find good tutorials on android design. Not "Best practices". But actual code examples of how to implement design features. How to achieve a professional looking design. How to design your UI with fluid animations etc. Anyone got any good technical resources on android design?
4
544,853
02/13/2009 05:40:55
22,962
09/27/2008 09:22:53
26
1
How Many Zend Certified Engineer?
I found [a tool][1] on Zend site. But it is only show who have achieved ZCE by country. I plan to take ZCE for PHP 5 and I just want to know how many Zend certified engineer available around the world. Thanks... [1]: http://www.zend.com/store/education/certification/yellow-pages.php
php
certificate
null
null
null
08/31/2009 12:19:56
not a real question
How Many Zend Certified Engineer? === I found [a tool][1] on Zend site. But it is only show who have achieved ZCE by country. I plan to take ZCE for PHP 5 and I just want to know how many Zend certified engineer available around the world. Thanks... [1]: http://www.zend.com/store/education/certification/yellow-pages.php
1
8,798,531
01/10/2012 04:22:13
1,138,045
01/09/2012 05:26:53
3
0
NSMutableArray gives the EXC_BAD_ACCESS
iam developing one applicaiton.In that iam using the NSMutableArray for saving the data from database.After getting the data from database if iam perform any action on that NSMutableArray the application will got the EXC_BAD_ACCESS.So please tell me how to solve this one.
iphone
null
null
null
null
01/10/2012 09:07:50
not a real question
NSMutableArray gives the EXC_BAD_ACCESS === iam developing one applicaiton.In that iam using the NSMutableArray for saving the data from database.After getting the data from database if iam perform any action on that NSMutableArray the application will got the EXC_BAD_ACCESS.So please tell me how to solve this one.
1
10,272,106
04/22/2012 21:03:31
429,274
08/24/2010 08:14:05
1
2
django 'too many SQL variables' error with ModelMultipleChoiceField
I have a form with `ModelMultipleChoiceField` on it, and I am getting `'DatabaseError: too many SQL variables'` (using SQLite) when the user picks more than 1000 entries in the selection widget and posts the form. The problem seems to be the method `clean` of `ModelMultipleChoiceField`, which tries to select objects from the database simply by the `IN` SQL clause (e.g. SELECT * FROM projects WHERE id IN (1,2,3)). When the number of numbers in the IN argument rises over 1000 the `too many SQL variables` happens. I am using the most recent version of Django (1.5.dev17922), though I think it is irrelevant because similar issues happened even with older versions. I have always worked around this problem by custom temporary models that I used for joins of more complex queries. But more and more it seems to me that, either there already is a systematic solution to this problem that I am missing (which I hope somebody could point out to me), or there at least needs to be a need for it -- how do you address similar situations? -- in which case I can start thinking how to propose something general that could later be incorporated into Django. Thanks for any suggestions or help.
python
django
sqlite
null
null
null
open
django 'too many SQL variables' error with ModelMultipleChoiceField === I have a form with `ModelMultipleChoiceField` on it, and I am getting `'DatabaseError: too many SQL variables'` (using SQLite) when the user picks more than 1000 entries in the selection widget and posts the form. The problem seems to be the method `clean` of `ModelMultipleChoiceField`, which tries to select objects from the database simply by the `IN` SQL clause (e.g. SELECT * FROM projects WHERE id IN (1,2,3)). When the number of numbers in the IN argument rises over 1000 the `too many SQL variables` happens. I am using the most recent version of Django (1.5.dev17922), though I think it is irrelevant because similar issues happened even with older versions. I have always worked around this problem by custom temporary models that I used for joins of more complex queries. But more and more it seems to me that, either there already is a systematic solution to this problem that I am missing (which I hope somebody could point out to me), or there at least needs to be a need for it -- how do you address similar situations? -- in which case I can start thinking how to propose something general that could later be incorporated into Django. Thanks for any suggestions or help.
0
5,156,486
03/01/2011 15:23:16
270,274
02/10/2010 12:49:21
55
3
best way to tell a user why my web app doesn't support Internet Explorer
as you all know internet explorer sucks ^^, so i will probably never write code for it are they some nice text out there that explains to an average visitor why he shouldn't use Internet Explorer? e.g. is http://www.ie6nomore.com/ nice but only targeting IE6 and doesn't explain to the user why he should change his browser thanks guys!
internet-explorer
web-applications
browser
null
null
03/01/2011 16:39:19
off topic
best way to tell a user why my web app doesn't support Internet Explorer === as you all know internet explorer sucks ^^, so i will probably never write code for it are they some nice text out there that explains to an average visitor why he shouldn't use Internet Explorer? e.g. is http://www.ie6nomore.com/ nice but only targeting IE6 and doesn't explain to the user why he should change his browser thanks guys!
2
5,850,962
05/01/2011 20:00:08
719,813
04/20/2011 03:06:51
36
1
How to count clicks on a $_GET value with php?
I have a website which generates every new user their own unique link (http://website.com/?id=12345). I want to include a click counter to show the user how much times their link has been visited. Does anyone know how to do this?
php
click
counter
null
null
05/02/2011 18:49:32
not a real question
How to count clicks on a $_GET value with php? === I have a website which generates every new user their own unique link (http://website.com/?id=12345). I want to include a click counter to show the user how much times their link has been visited. Does anyone know how to do this?
1
7,729,238
10/11/2011 16:19:06
101,827
05/05/2009 20:31:44
3,984
171
Oracle SQL query fails only in one process: "ORA-01405: fetched column value is NULL"
I'm trying to call a system stored procedure in a "plugin" that I've built. When I test my plugin out in a test application, it works fine. When I run the plugin in the targeted app I'm building it for, I get an exception from Oracle that doesn't make any sense. I'm using Oracle server 11.2.0.1.0, and ODP.NET 2.112.2.0. Here's the debug trace from ODP.NET from my test app: (ENTRY) OracleConnection::OracleConnection(1) (POOL) New connection pool created for: "Data Source=orcl;User ID=scott;" (ENTRY) OracleConnection::CreateCommand() OpsSqlPrepare2():SQL: begin DBMS_AQADM.START_QUEUE(queue_name => 'MyQueue'); end; (EXIT) OpsSqlExecuteNonQuery(): RetCode=0 Line=877 (EXIT) OracleCommand::ExecuteNonQuery() (ENTRY) OracleConnection::Dispose() (ENTRY) OracleConnection::Close() And here's debug trace from ODP.NET from the same code running in the targeted app: (ENTRY) OracleConnection::OracleConnection(1) (POOL) New connection pool created for: "Data Source=orcl;User ID=scott;" (ENTRY) OracleConnection::CreateCommand() OpsSqlPrepare2():SQL: begin DBMS_AQADM.START_QUEUE(queue_name => 'MyQueue'); end; (EXIT) OpsSqlExecuteNonQuery(): RetCode=0 Line=877 (EXIT) OracleCommand::ExecuteNonQuery() (ENTRY) OpsErrGetOpoCtx() (ERROR) Oracle error code=1405; ORA-01405: fetched column value is NULL (EXIT) OpsErrGetOpoCtx(): RetCode=0 Line=137 (ENTRY) OracleConnection::Dispose() (ENTRY) OracleConnection::Close() I'm at a loss as to what could be different between the test/target applications. Both processes are running as members of the local Administrators group. Both are using the same connection string. Both are running the same .NET code, but with a different outcome from the database server. What could be going on here?
sql
oracle
stored-procedures
odp.net
advanced-queuing
null
open
Oracle SQL query fails only in one process: "ORA-01405: fetched column value is NULL" === I'm trying to call a system stored procedure in a "plugin" that I've built. When I test my plugin out in a test application, it works fine. When I run the plugin in the targeted app I'm building it for, I get an exception from Oracle that doesn't make any sense. I'm using Oracle server 11.2.0.1.0, and ODP.NET 2.112.2.0. Here's the debug trace from ODP.NET from my test app: (ENTRY) OracleConnection::OracleConnection(1) (POOL) New connection pool created for: "Data Source=orcl;User ID=scott;" (ENTRY) OracleConnection::CreateCommand() OpsSqlPrepare2():SQL: begin DBMS_AQADM.START_QUEUE(queue_name => 'MyQueue'); end; (EXIT) OpsSqlExecuteNonQuery(): RetCode=0 Line=877 (EXIT) OracleCommand::ExecuteNonQuery() (ENTRY) OracleConnection::Dispose() (ENTRY) OracleConnection::Close() And here's debug trace from ODP.NET from the same code running in the targeted app: (ENTRY) OracleConnection::OracleConnection(1) (POOL) New connection pool created for: "Data Source=orcl;User ID=scott;" (ENTRY) OracleConnection::CreateCommand() OpsSqlPrepare2():SQL: begin DBMS_AQADM.START_QUEUE(queue_name => 'MyQueue'); end; (EXIT) OpsSqlExecuteNonQuery(): RetCode=0 Line=877 (EXIT) OracleCommand::ExecuteNonQuery() (ENTRY) OpsErrGetOpoCtx() (ERROR) Oracle error code=1405; ORA-01405: fetched column value is NULL (EXIT) OpsErrGetOpoCtx(): RetCode=0 Line=137 (ENTRY) OracleConnection::Dispose() (ENTRY) OracleConnection::Close() I'm at a loss as to what could be different between the test/target applications. Both processes are running as members of the local Administrators group. Both are using the same connection string. Both are running the same .NET code, but with a different outcome from the database server. What could be going on here?
0
6,042,726
05/18/2011 09:46:11
758,933
05/18/2011 09:46:11
1
0
Can anybody translate this to a c# code?
<Window.Resources> <Storyboard x:Key="AnimateTarget"> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleX"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:3" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleY"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> my full code is this xD <Window x:Class="BounceBaby.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" Name="pae" Loaded="pae_Loaded"> <Grid> <Image Source="/BounceBaby;component/Images/map.png" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" > <Image.RenderTransform> <ScaleTransform x:Name ="Transform" /> </Image.RenderTransform> </Image> <Button x:Name="StartAnimation" Click="StartAnimation_Click" Content="Start" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="5" /> </Grid> <Window.Resources> <Storyboard x:Key="AnimateTarget"> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleX"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:3" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleY"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> </Window>
c#
wpf
easing-functions
null
null
05/18/2011 13:15:52
too localized
Can anybody translate this to a c# code? === <Window.Resources> <Storyboard x:Key="AnimateTarget"> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleX"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:3" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleY"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> my full code is this xD <Window x:Class="BounceBaby.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525" Name="pae" Loaded="pae_Loaded"> <Grid> <Image Source="/BounceBaby;component/Images/map.png" Height="50" Width="50" RenderTransformOrigin="0.5,0.5" > <Image.RenderTransform> <ScaleTransform x:Name ="Transform" /> </Image.RenderTransform> </Image> <Button x:Name="StartAnimation" Click="StartAnimation_Click" Content="Start" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="5" /> </Grid> <Window.Resources> <Storyboard x:Key="AnimateTarget"> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleX"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:3" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform" Storyboard.TargetProperty="ScaleY"> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="0.0" /> <EasingDoubleKeyFrame KeyTime="0:0:0" Value="2.0"> <EasingDoubleKeyFrame.EasingFunction> <ElasticEase EasingMode="EaseOut" Oscillations="13" Springiness="8" /> </EasingDoubleKeyFrame.EasingFunction> </EasingDoubleKeyFrame> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> </Window>
3
361,249
12/11/2008 22:30:44
8,435
09/15/2008 16:01:38
5,453
213
Javascript Variable not available in external file
<strong>Is this something with javascript; or is it something else I'm doing wrong.</strong> file1.js > var collection = new Object(); > collection.foo = new Array(1, 2, 3); file 2.js > var someClass = new Class({ > bar : function() { > alert(collection.foo.length); > } > }); index.html > <script type="text/javascript" src="file1.js"></script> > <script type="text/javascript" src="file2.js"></script> > <script type="text/javascript"> > var x = new someClass(); > x.bar(); //cannot find collection > </script> <strong>So I tried another approach:</strong> file1.js > collection.foo = new Array(1, 2, 3); file 2.js > var someClass = new Class({ > bar : function() { > alert(collection.foo.length); > } > }); index.html > <script type="text/javascript"> > var collection = new Object(); > </script> > <script type="text/javascript" src="file1.js"></script> > <script type="text/javascript" src="file2.js"></script> > <script type="text/javascript"> > var x = new someClass(); > x.bar(); //cannot find collection.foo > </script> I'm using mooTools (where the Class object comes from) if you think that matters.
javascript
mootools
null
null
null
12/29/2008 12:37:01
too localized
Javascript Variable not available in external file === <strong>Is this something with javascript; or is it something else I'm doing wrong.</strong> file1.js > var collection = new Object(); > collection.foo = new Array(1, 2, 3); file 2.js > var someClass = new Class({ > bar : function() { > alert(collection.foo.length); > } > }); index.html > <script type="text/javascript" src="file1.js"></script> > <script type="text/javascript" src="file2.js"></script> > <script type="text/javascript"> > var x = new someClass(); > x.bar(); //cannot find collection > </script> <strong>So I tried another approach:</strong> file1.js > collection.foo = new Array(1, 2, 3); file 2.js > var someClass = new Class({ > bar : function() { > alert(collection.foo.length); > } > }); index.html > <script type="text/javascript"> > var collection = new Object(); > </script> > <script type="text/javascript" src="file1.js"></script> > <script type="text/javascript" src="file2.js"></script> > <script type="text/javascript"> > var x = new someClass(); > x.bar(); //cannot find collection.foo > </script> I'm using mooTools (where the Class object comes from) if you think that matters.
3
8,339,556
12/01/2011 10:09:36
1,074,799
12/01/2011 05:36:22
1
2
What is equivalent features of WPF in QtQuick?
<br/> I am a WPF programmer. But i see some weakness on WPF (see [this my replay][1]). So i curious to research for QtQuick.<br/> WPF has some great features such as: - Hardware accelerated - Animations and effects - Triggers( Trigger, DataTrigger, EventTrigger) - Resources - Templates - Commands - Binding - Good for MVVM Pattern - Geometries - Clip mask and Gradient and composing controls - Creating SilverLight version of application for web What is equivalents of these features on QtQuick? [1]: http://stackoverflow.com/questions/2706037/what-are-the-real-world-benefits-of-declarative-ui-languages-such-as-xaml-and-qm/8337465#8337465 "this reply"
wpf
qt
xaml
qml
qt-quick
12/05/2011 20:18:43
not a real question
What is equivalent features of WPF in QtQuick? === <br/> I am a WPF programmer. But i see some weakness on WPF (see [this my replay][1]). So i curious to research for QtQuick.<br/> WPF has some great features such as: - Hardware accelerated - Animations and effects - Triggers( Trigger, DataTrigger, EventTrigger) - Resources - Templates - Commands - Binding - Good for MVVM Pattern - Geometries - Clip mask and Gradient and composing controls - Creating SilverLight version of application for web What is equivalents of these features on QtQuick? [1]: http://stackoverflow.com/questions/2706037/what-are-the-real-world-benefits-of-declarative-ui-languages-such-as-xaml-and-qm/8337465#8337465 "this reply"
1
9,508,301
02/29/2012 23:25:06
561,357
01/03/2011 14:48:39
24
0
Checking the manner in which an Activity has been "reanimated"
How would an Activity know if it has just been brought back from either being minimized (e.g., the user pressed Home and did other stuff and then brought the app back into the foreground afterwards) or from the screen timing out and the screen going black? If I hit Home while on an app, then OnDestroy doesn't necessarily fire, does it? Same goes for if the screen times out. So it doesn't seem there will be a way to set a flag as soon as the screen leaves the foreground. OnResume seems to fire all the time, definitely not just when an Activity is brought back to the foreground. Watching LogCat I don't see anything that gives me any hints, so here I am...
android
activity
null
null
null
null
open
Checking the manner in which an Activity has been "reanimated" === How would an Activity know if it has just been brought back from either being minimized (e.g., the user pressed Home and did other stuff and then brought the app back into the foreground afterwards) or from the screen timing out and the screen going black? If I hit Home while on an app, then OnDestroy doesn't necessarily fire, does it? Same goes for if the screen times out. So it doesn't seem there will be a way to set a flag as soon as the screen leaves the foreground. OnResume seems to fire all the time, definitely not just when an Activity is brought back to the foreground. Watching LogCat I don't see anything that gives me any hints, so here I am...
0
4,950,180
02/09/2011 20:37:00
515,453
11/21/2010 22:38:13
42
2
Is there a place/person/group that I could send some comments about the Android Tutorials to?
I'm cutting threw the Android Tutorials ( http://developer.android.com/resources/index.html ), and while I like them, and find most of them interesting, there are a couple I find... Well, somewhat frustrating. Is there a person or place I could address some suggestions to? This isn't a complaint, or attempt to bash the tutorials. I think that in general there great, and so far I've learned a lot, but there a few place in the tutorials where I had to read over tons of docs, search the web, and even come here and ask for help... where an extra sentence, or a small bit of advice before the tutorial section would have saved me a few hours of head scratching. Joe
android
null
null
null
null
02/10/2011 09:38:08
off topic
Is there a place/person/group that I could send some comments about the Android Tutorials to? === I'm cutting threw the Android Tutorials ( http://developer.android.com/resources/index.html ), and while I like them, and find most of them interesting, there are a couple I find... Well, somewhat frustrating. Is there a person or place I could address some suggestions to? This isn't a complaint, or attempt to bash the tutorials. I think that in general there great, and so far I've learned a lot, but there a few place in the tutorials where I had to read over tons of docs, search the web, and even come here and ask for help... where an extra sentence, or a small bit of advice before the tutorial section would have saved me a few hours of head scratching. Joe
2
10,081,295
04/09/2012 23:46:21
352,374
05/27/2010 21:05:01
482
7
Allow modification of only non-zero elements of a sparse matrix - homework
I am implementing a tridiagonal matrix and I have to be as efficient as possible. Obviously I will only hold the elements that contain data. I overloaded the `operator()` to act as an indexer into the matrix, but I want this operator to return a reference so that the user can modify the matrix. However, I cannot just `return 0;` for the non-tridiagonal elements since the zero is not a reference. How do I let the user modify the data on the tridiagonal, but when the `operator()` is used to inspect a non-tridiagonal element, only return 0 instead of a reference to 0? below is the related class definition template <class T> class tridiagonal { public: tridiagonal(); ~tridiagonal(); T& operator()(int i, int j); const T& operator()(int i, int j) const; private: //holds data of just the diagonals T * m_upper; T * m_main; T * m_lower; };
c++
operator-overloading
sparse-matrix
null
null
null
open
Allow modification of only non-zero elements of a sparse matrix - homework === I am implementing a tridiagonal matrix and I have to be as efficient as possible. Obviously I will only hold the elements that contain data. I overloaded the `operator()` to act as an indexer into the matrix, but I want this operator to return a reference so that the user can modify the matrix. However, I cannot just `return 0;` for the non-tridiagonal elements since the zero is not a reference. How do I let the user modify the data on the tridiagonal, but when the `operator()` is used to inspect a non-tridiagonal element, only return 0 instead of a reference to 0? below is the related class definition template <class T> class tridiagonal { public: tridiagonal(); ~tridiagonal(); T& operator()(int i, int j); const T& operator()(int i, int j) const; private: //holds data of just the diagonals T * m_upper; T * m_main; T * m_lower; };
0
7,358,639
09/09/2011 07:54:03
658,956
03/14/2011 14:31:27
58
3
How can I achieve a has_many user interface to add users from companies
The requirement is part of a support system. For each ticket the support system user needs to be able to select one or more companies and from those companies select one or more employees. The schema is so far setup as company has_many users and tickets are linked to users (regardless of company) by an intermediate table with simple ticket_id and user_id fields. Previously a large multiselect was used but even with the company name added to the text and the collection ordered by company_name and forename the list quickly became extremely long and one false click and the selection would be reset. I guess what I am looking for is a way to list companies, as the company is selected it will populate a list of users for that company with an add/remove to add or remove them from the list of users assigned to that ticket. I am thinking : Company dropdown -> [populates] -> user list -> [Add|Remove buttons] -> List of users saved in database. Thanks in advance for any ideas. Dave
ruby-on-rails
jquery-ui
null
null
null
null
open
How can I achieve a has_many user interface to add users from companies === The requirement is part of a support system. For each ticket the support system user needs to be able to select one or more companies and from those companies select one or more employees. The schema is so far setup as company has_many users and tickets are linked to users (regardless of company) by an intermediate table with simple ticket_id and user_id fields. Previously a large multiselect was used but even with the company name added to the text and the collection ordered by company_name and forename the list quickly became extremely long and one false click and the selection would be reset. I guess what I am looking for is a way to list companies, as the company is selected it will populate a list of users for that company with an add/remove to add or remove them from the list of users assigned to that ticket. I am thinking : Company dropdown -> [populates] -> user list -> [Add|Remove buttons] -> List of users saved in database. Thanks in advance for any ideas. Dave
0
8,863,444
01/14/2012 16:12:22
297,131
03/19/2010 06:32:32
573
17
What is the market share for different Ruby versions and implementations?
Where can I find reliable statistics for Ruby usage, by versions and implementations?
ruby
null
null
null
null
01/16/2012 03:03:45
too localized
What is the market share for different Ruby versions and implementations? === Where can I find reliable statistics for Ruby usage, by versions and implementations?
3
9,929,137
03/29/2012 16:02:54
1,296,388
03/27/2012 18:55:57
11
4
Delegate Func<> in windows form application C#
The following code works: class Program { static void Main(string[] args) { List<Func<string, string>> mylist = new List<Func<string, string>>(); mylist.Add(Navigation); mylist.Add(Tactic); Func<string, string> GameOfThrones = mylist[0]; string name = "NONE"; Console.WriteLine(GameOfThrones(name)); Console.ReadLine(); } private static string Navigation(string tmp) { return "Navigation"; } private static string Tactic(string tmp) { return "Tactic"; } } But i wish to use this with an windows form application not console. I tried the following, but I can't get it to work: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { List<Func<string, string>> mylist = new List<Func<string, string>>(); mylist.Add(Navigation); mylist.Add(Tactic); Func<string, string> SkillCall = mylist[0]; string name ="NONE"; TextBox1.Text = SkillCall(name); } private static string Navigation(string tmp) { return "Navigation"; } private static string Tactic(string tmp) { return "Tactic"; } } Error 8 'mylist' is a 'field' but is used like a 'type'
c#
forms
delegates
func
null
03/30/2012 01:37:01
too localized
Delegate Func<> in windows form application C# === The following code works: class Program { static void Main(string[] args) { List<Func<string, string>> mylist = new List<Func<string, string>>(); mylist.Add(Navigation); mylist.Add(Tactic); Func<string, string> GameOfThrones = mylist[0]; string name = "NONE"; Console.WriteLine(GameOfThrones(name)); Console.ReadLine(); } private static string Navigation(string tmp) { return "Navigation"; } private static string Tactic(string tmp) { return "Tactic"; } } But i wish to use this with an windows form application not console. I tried the following, but I can't get it to work: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { List<Func<string, string>> mylist = new List<Func<string, string>>(); mylist.Add(Navigation); mylist.Add(Tactic); Func<string, string> SkillCall = mylist[0]; string name ="NONE"; TextBox1.Text = SkillCall(name); } private static string Navigation(string tmp) { return "Navigation"; } private static string Tactic(string tmp) { return "Tactic"; } } Error 8 'mylist' is a 'field' but is used like a 'type'
3
8,141,632
11/15/2011 19:00:36
1,048,265
11/15/2011 18:58:08
1
0
Drawing on a textBox in C# with mouse
I have an assignment to write a program in C# that uses a panel for scroll bars (which I have accomplished) and adding a picture box on top of that to allow drawing with a mouse. The program is also supposed to allow the user to choose different options from the menustrip. These include saving, saving as, resizing the image, choosing brush: size, shape, color. and the user has to be able to erase with the right mouse button. I am having a hard time just getting the drawing part to work. Here is what I have so far: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace PaintProgram_odelld { public partial class Form1 : Form { bool canPaint = false; public Form1() { InitializeComponent(); } private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (canPaint) { Bitmap Image = new Bitmap(pictureBox1.Image); using (Graphics graphics = CreateGraphics()) { graphics.FillEllipse(new SolidBrush(Color.BlueViolet), e.X, e.Y, 4, 4); pictureBox1.Image = Image; } } } private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { //indeicate release of the mouse button canPaint = false; } private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { //the user is dragging the mouse canPaint = true; } } } any suggestions?
c#
null
null
null
null
11/16/2011 23:24:04
not a real question
Drawing on a textBox in C# with mouse === I have an assignment to write a program in C# that uses a panel for scroll bars (which I have accomplished) and adding a picture box on top of that to allow drawing with a mouse. The program is also supposed to allow the user to choose different options from the menustrip. These include saving, saving as, resizing the image, choosing brush: size, shape, color. and the user has to be able to erase with the right mouse button. I am having a hard time just getting the drawing part to work. Here is what I have so far: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace PaintProgram_odelld { public partial class Form1 : Form { bool canPaint = false; public Form1() { InitializeComponent(); } private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { if (canPaint) { Bitmap Image = new Bitmap(pictureBox1.Image); using (Graphics graphics = CreateGraphics()) { graphics.FillEllipse(new SolidBrush(Color.BlueViolet), e.X, e.Y, 4, 4); pictureBox1.Image = Image; } } } private void pictureBox1_MouseUp(object sender, MouseEventArgs e) { //indeicate release of the mouse button canPaint = false; } private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { //the user is dragging the mouse canPaint = true; } } } any suggestions?
1
10,610,358
05/15/2012 23:50:05
1,104,896
12/18/2011 20:26:07
1
0
Via Header & IP cop chaos
Well here is a tricky situation. So we have an ISP provide who uses 24onlinebilling(.com) system & it acts as DNS Server, Internet Gateway & what not. **The Situation:** `Turn on the computer -> GET google.com (in browser) --> You see a login Page --> Enter your credentials provided by your ISP & it lets you through` , opens all the ports for you to access any server on the the internet. **Crazy situation:** `Turn on the computer -> GET google.com (shell) --> You get the login page response.` But, I noticed a `Via: 1.1 Webcat-Slein` header field in the response header which doesn't come if I am logged in. Also, All the ports are closed for me if I do not login , for example - `ssh root@myremoteserver` fails. I started wondering and `nmap`ped the server to find that it says RedHat Linux , Apache 1.3.27 , mob_jk , etc etc. & in the OS Suggestions it says IP Cop . I searched for IP Cop & looked into what it does, and it says its a completely different Linux distro. *what?!* How come the nmap is showing Redhat linux then? My question here is **`How does this login thing work?`** I mean, what happens? Does it go something like : --> To the Gateway --> Gateway looks for some session Id (How?) --> Checks its database or something --> If exists/ not exists transforms the request and proceeds? `which gateway service (apache module) is it that receives the request?` `Plus, if I do not login, and SSH to a remote server then it is unable to connect. What happens in this case? I think it is not received by any service on the gateway.` `Does the service do that check-session thing for every request?! Like 1000s of requests per second?` Sorry for the long question, but I just thought I'd ask a bit clearly for others who have the same question can relate. Thanks. :)
linux
apache
tomcat
ip
firewall
05/16/2012 10:18:30
off topic
Via Header & IP cop chaos === Well here is a tricky situation. So we have an ISP provide who uses 24onlinebilling(.com) system & it acts as DNS Server, Internet Gateway & what not. **The Situation:** `Turn on the computer -> GET google.com (in browser) --> You see a login Page --> Enter your credentials provided by your ISP & it lets you through` , opens all the ports for you to access any server on the the internet. **Crazy situation:** `Turn on the computer -> GET google.com (shell) --> You get the login page response.` But, I noticed a `Via: 1.1 Webcat-Slein` header field in the response header which doesn't come if I am logged in. Also, All the ports are closed for me if I do not login , for example - `ssh root@myremoteserver` fails. I started wondering and `nmap`ped the server to find that it says RedHat Linux , Apache 1.3.27 , mob_jk , etc etc. & in the OS Suggestions it says IP Cop . I searched for IP Cop & looked into what it does, and it says its a completely different Linux distro. *what?!* How come the nmap is showing Redhat linux then? My question here is **`How does this login thing work?`** I mean, what happens? Does it go something like : --> To the Gateway --> Gateway looks for some session Id (How?) --> Checks its database or something --> If exists/ not exists transforms the request and proceeds? `which gateway service (apache module) is it that receives the request?` `Plus, if I do not login, and SSH to a remote server then it is unable to connect. What happens in this case? I think it is not received by any service on the gateway.` `Does the service do that check-session thing for every request?! Like 1000s of requests per second?` Sorry for the long question, but I just thought I'd ask a bit clearly for others who have the same question can relate. Thanks. :)
2
8,091,850
11/11/2011 09:18:41
963,038
09/24/2011 21:24:37
3
0
About exporting as video format in flash cs5
I want to export an animation as a video file. But I don't understand what should I do. Which will be the best? And how do I keep the size low? I have exported this as avi and mov. But I cannot do it as flv. Can you please tell me how to do it??
flash
flv
null
null
null
11/11/2011 13:13:53
off topic
About exporting as video format in flash cs5 === I want to export an animation as a video file. But I don't understand what should I do. Which will be the best? And how do I keep the size low? I have exported this as avi and mov. But I cannot do it as flv. Can you please tell me how to do it??
2
10,136,993
04/13/2012 07:43:07
1,068,887
11/28/2011 07:37:43
1
0
How to extract data into associative array from HTML table using jQuery?
Suppose I have HTML like this, <table id="Words"> <tr> <td class="cell">Hello</td> <td class="desc">A word</td> </tr> <tr> <td class="cell">Bye</td> <td class="desc">A word</td> </tr> <tr> <td class="cell">Tricicle</td> <td class="desc">A toy</td> </tr> </table> Is there any elegant way/function to convert this to javascript associative array? How to go about it?
javascript
jquery
html
table
associative-array
null
open
How to extract data into associative array from HTML table using jQuery? === Suppose I have HTML like this, <table id="Words"> <tr> <td class="cell">Hello</td> <td class="desc">A word</td> </tr> <tr> <td class="cell">Bye</td> <td class="desc">A word</td> </tr> <tr> <td class="cell">Tricicle</td> <td class="desc">A toy</td> </tr> </table> Is there any elegant way/function to convert this to javascript associative array? How to go about it?
0
3,382,033
08/01/2010 12:29:30
406,608
07/30/2010 10:10:32
6
0
How to run a html file from php?
I am trying to figure out how we can run a html file within a php script.
php
html
null
null
null
08/01/2010 12:52:22
not a real question
How to run a html file from php? === I am trying to figure out how we can run a html file within a php script.
1
132,092
09/25/2008 08:19:30
15,368
09/17/2008 08:43:07
111
13
What are you favourite Matlab/Octave programming tricks?
I think everyone would agree that the matlab language is not pretty, or particularly consistent. But nevermind! We still have to use it to get things done. What are your favourite tricks for making things easier? Lets have one per answer so people can vote them up if they agree. Also, try to illustrate your answer with an example.
matlab
tricks
null
null
null
11/27/2011 17:32:14
not constructive
What are you favourite Matlab/Octave programming tricks? === I think everyone would agree that the matlab language is not pretty, or particularly consistent. But nevermind! We still have to use it to get things done. What are your favourite tricks for making things easier? Lets have one per answer so people can vote them up if they agree. Also, try to illustrate your answer with an example.
4
5,246,958
03/09/2011 14:10:08
651,689
03/09/2011 14:10:08
1
0
wristwatch with millisecond number counter
I have exhausted my searching for a watch that shows the milliseconds counting down.
javascript
null
null
null
null
null
open
wristwatch with millisecond number counter === I have exhausted my searching for a watch that shows the milliseconds counting down.
0
8,106,198
11/12/2011 17:30:04
710,526
04/15/2011 20:46:36
18
0
Block commands in Linux
I have to give access to a person on one of my servers, but I want that person only can use command 'tail'. How can I do that? Is there a way to block commands in Linux for a user? Thanks a lot.
linux
bash
shell
ubuntu
null
11/12/2011 17:52:03
off topic
Block commands in Linux === I have to give access to a person on one of my servers, but I want that person only can use command 'tail'. How can I do that? Is there a way to block commands in Linux for a user? Thanks a lot.
2
3,165,411
07/02/2010 11:55:43
295,264
03/17/2010 00:16:39
2,392
120
How to display categories in search result of Search Engines like Google?
I know while we setup meta tags in our websites, we are configuring how a Search Engine lists our websites in their Database, but while searching some popular site like FiFA World Cup(for now), torrentz and others. I have attached some pictures referring to what I am telling. ![See Image][1] How to accomplishes such result [1]: http://www.freeimagehosting.net/uploads/5e55789b4a.jpg
website
seo-optimization
null
null
null
12/02/2011 16:28:47
off topic
How to display categories in search result of Search Engines like Google? === I know while we setup meta tags in our websites, we are configuring how a Search Engine lists our websites in their Database, but while searching some popular site like FiFA World Cup(for now), torrentz and others. I have attached some pictures referring to what I am telling. ![See Image][1] How to accomplishes such result [1]: http://www.freeimagehosting.net/uploads/5e55789b4a.jpg
2
6,092,836
05/23/2011 04:28:48
480,045
10/19/2010 04:47:06
63
0
Change object's layer dynamically in WPF.
I need to do something like "Move up", "Move down" with the objects on my GRID from C# code while executing, is there any possibilities?
wpf
visual-studio-2010
layer
null
null
null
open
Change object's layer dynamically in WPF. === I need to do something like "Move up", "Move down" with the objects on my GRID from C# code while executing, is there any possibilities?
0
4,563,561
12/30/2010 14:52:52
79,111
03/17/2009 17:14:48
1,489
59
jQuery selector vs. filter unexpected result
`html` is a piece of HTML containing inline Javascript resulting from an AJAX request. The following code: $(html).filter('script') returns a jQuery object for each script tag, whereas: $('script', $(html)) returns an empty array. How is this possible? I'm using Chromium 10.0.
javascript
jquery
null
null
null
null
open
jQuery selector vs. filter unexpected result === `html` is a piece of HTML containing inline Javascript resulting from an AJAX request. The following code: $(html).filter('script') returns a jQuery object for each script tag, whereas: $('script', $(html)) returns an empty array. How is this possible? I'm using Chromium 10.0.
0
10,074,688
04/09/2012 14:26:05
1,126,245
01/02/2012 12:46:34
3
1
blogger/stackoverflow/wordpress like text editor
Have you noticed the text editor in blogger/stackoverflow/wordpress How to create such one for my website using php? Can you suggest any tutorials?
php
wordpress
text-editor
stackoverflow
blogger
04/09/2012 14:33:50
not a real question
blogger/stackoverflow/wordpress like text editor === Have you noticed the text editor in blogger/stackoverflow/wordpress How to create such one for my website using php? Can you suggest any tutorials?
1
8,784,102
01/09/2012 04:58:14
538,786
12/11/2010 09:57:35
83
1
z-index not working with other elements
I am trying to hide `footer` behind `#blog-wrap` but for some reason, it's not working. Using `z-index: -1;` moves the element behind text, but that is about it. Here is the HTML for `footer` <footer> <span class="post-date"> Posted on <a href="#"> 12.12.12 </a> </span> <span class="post-comments"> &amp; Has <a href="#"> 12 Comments </a> </span> <span class="tags"> <label> Tags: </label> <a href="#"> Music </a> </span> </footer> and the CSS for `footer`, `#blog-wrap` section footer { background: green; width: 200px; border-radius: 5px; padding: 10px; position: absolute; top: 150px; z-index: -200; left: -100px; } #blog-wrap { background: #69b26d url(../images/blog-wrap-bg.png) repeat; box-shadow: inset 0 0 7px rgba(0, 0, 0, .6), 0 -1px 1px rgba(255, 255, 255, .8); border-radius: 3px; float: left; margin: 40px ; padding: 14px; width: 500px; letter-spacing: 1px; line-height: 25px; text-shadow: 1px 1px 1px rgba(0, 0, 0, .4); position: relative; z-index: 500; } See anything wrong with the above code? `footer` just won't simply move behind `#blog-wrap`
html
css
position
z-index
null
01/09/2012 13:40:01
not a real question
z-index not working with other elements === I am trying to hide `footer` behind `#blog-wrap` but for some reason, it's not working. Using `z-index: -1;` moves the element behind text, but that is about it. Here is the HTML for `footer` <footer> <span class="post-date"> Posted on <a href="#"> 12.12.12 </a> </span> <span class="post-comments"> &amp; Has <a href="#"> 12 Comments </a> </span> <span class="tags"> <label> Tags: </label> <a href="#"> Music </a> </span> </footer> and the CSS for `footer`, `#blog-wrap` section footer { background: green; width: 200px; border-radius: 5px; padding: 10px; position: absolute; top: 150px; z-index: -200; left: -100px; } #blog-wrap { background: #69b26d url(../images/blog-wrap-bg.png) repeat; box-shadow: inset 0 0 7px rgba(0, 0, 0, .6), 0 -1px 1px rgba(255, 255, 255, .8); border-radius: 3px; float: left; margin: 40px ; padding: 14px; width: 500px; letter-spacing: 1px; line-height: 25px; text-shadow: 1px 1px 1px rgba(0, 0, 0, .4); position: relative; z-index: 500; } See anything wrong with the above code? `footer` just won't simply move behind `#blog-wrap`
1
5,590,751
04/08/2011 05:17:37
698,029
04/08/2011 05:17:37
1
0
blackberry or android
I am a blackberry developer for the past 1 year.I now want to switch over to android.Can anyone tell me the merits and demerits of it with respective to future scope.
android
blackberry
null
null
null
04/10/2011 01:28:59
not constructive
blackberry or android === I am a blackberry developer for the past 1 year.I now want to switch over to android.Can anyone tell me the merits and demerits of it with respective to future scope.
4
8,074,006
11/10/2011 01:34:53
1,038,838
11/10/2011 01:31:51
1
0
java.util.Vector<E> Roadblock
Referring to: http://download.oracle.com/javase/7/docs/api/java/util/Vector.html#addElement(E) I have an assignment for my OOP class where I have to write classes for a Asteroids-like java game. I have to use vectors to represent the x and y positions as well as the x and y velocities of the shots and the comets. So, when they are initialized, they look like this: "public Vector<Shot> shots;" and "public Vector<Comet> comets;". I'm having issues getting shots.size() to not equal zero when the for loop inside updateShots() is called, thus it's not getting to the part where the shot actually fires. Every time I try and add elements to the vector, it tells me that the element must be of type "Shot" and that it can't convert my double to that type. I've been searching online for hours and hours and can't find anything that doesn't use Double, String, Integer, or Object as the binding for the Vector<E> class. I assume it has something to do with my Shot.class and something that needs to be added to that class. I'm not sure what code of mine I could post on here to help describe what issue I'm having. This is how the files are setup: CometsMain.java is the main java file; SpaceObjects is the overall class with 3 subclasses; Comet, Ship, and Shot are the 3 subclasses of SpaceObject, each extending SpaceObject; then Comet has 3 subclasses that aren't important at this time. The initialization I specified in the beginning it located in CometsMain.java. The Ship class has a method "Shot fire()", returning a new shot. The Shot class handles the "move()" method, actually controlling the bullets movement. I currently have all vector related code for the shot inside move(), inside the actual Shot class, but am not sure if it all needs to be in there or in the "Shot fire()" method inside Ship.class. Let me know what code you would like me to post or what other information is needed.
java
binding
vector
comets
null
11/10/2011 20:44:40
not a real question
java.util.Vector<E> Roadblock === Referring to: http://download.oracle.com/javase/7/docs/api/java/util/Vector.html#addElement(E) I have an assignment for my OOP class where I have to write classes for a Asteroids-like java game. I have to use vectors to represent the x and y positions as well as the x and y velocities of the shots and the comets. So, when they are initialized, they look like this: "public Vector<Shot> shots;" and "public Vector<Comet> comets;". I'm having issues getting shots.size() to not equal zero when the for loop inside updateShots() is called, thus it's not getting to the part where the shot actually fires. Every time I try and add elements to the vector, it tells me that the element must be of type "Shot" and that it can't convert my double to that type. I've been searching online for hours and hours and can't find anything that doesn't use Double, String, Integer, or Object as the binding for the Vector<E> class. I assume it has something to do with my Shot.class and something that needs to be added to that class. I'm not sure what code of mine I could post on here to help describe what issue I'm having. This is how the files are setup: CometsMain.java is the main java file; SpaceObjects is the overall class with 3 subclasses; Comet, Ship, and Shot are the 3 subclasses of SpaceObject, each extending SpaceObject; then Comet has 3 subclasses that aren't important at this time. The initialization I specified in the beginning it located in CometsMain.java. The Ship class has a method "Shot fire()", returning a new shot. The Shot class handles the "move()" method, actually controlling the bullets movement. I currently have all vector related code for the shot inside move(), inside the actual Shot class, but am not sure if it all needs to be in there or in the "Shot fire()" method inside Ship.class. Let me know what code you would like me to post or what other information is needed.
1
3,265,910
07/16/2010 14:32:42
228,697
12/10/2009 10:32:31
13
0
Wordpress COMMENTS IN URDU (other language)
I am working on a wordpress project. The my database is in utf general. It seems everything is fine in database side, the rest of the website is working wel except the comments. When i display comments wordpress just display symbols rather than words can anyone help me? <a href=http://www.freeimagehosting.net/><img src=http://www.freeimagehosting.net/uploads/67cbb3183f.jpg border=0 alt="Free Image Hosting"></a>
mysql
wordpress
utf-8
null
null
null
open
Wordpress COMMENTS IN URDU (other language) === I am working on a wordpress project. The my database is in utf general. It seems everything is fine in database side, the rest of the website is working wel except the comments. When i display comments wordpress just display symbols rather than words can anyone help me? <a href=http://www.freeimagehosting.net/><img src=http://www.freeimagehosting.net/uploads/67cbb3183f.jpg border=0 alt="Free Image Hosting"></a>
0
7,125,967
08/19/2011 18:42:08
777,982
05/31/2011 15:53:56
345
37
As a developer which programming language you had most frustration with?
Things such as it should work and it didn't? Things where things were not intuitive? Things like where you say I wish I quit. Things where you are lost? Things that you solved later, but you realized it was not worth that time Things that made you think, this is not a well written language? A shore answer is good enough.
windows
unix
programming-languages
null
null
08/19/2011 18:46:44
off topic
As a developer which programming language you had most frustration with? === Things such as it should work and it didn't? Things where things were not intuitive? Things like where you say I wish I quit. Things where you are lost? Things that you solved later, but you realized it was not worth that time Things that made you think, this is not a well written language? A shore answer is good enough.
2
11,173,869
06/23/2012 23:36:45
1,305,287
03/31/2012 17:00:02
1
0
Style comments please on my timer class
I'm a relative noob to Python. On a range of 0 to 10, where 0 is a complete noob and 9 is Guido, I'd put myself as 1 aspiring to 2. So I wanted a timer, rather like the Visual Basic object, and I wanted it with no cummulative error. And I wanted it flexible, so I wouldn't have to write another one. I'm very lazy BTW, so lazy that I will go to great lengths to avoid having to write something a second time. Actually, this fits quite well with the "write once, refer often" coding style. I liked the flexibility of the .config() setup style used for Tk controls, so wanted to implement that. I spent a long time searching for timers, and there seemed to be about 3 basic types, I eventually settled on the threading.Timer repeat call model. I spent far too long battling with freezes in IDLE, before realising that my timers appeared to run OK standalone, and that IDLE just didn't like threads (I've just installed IPython, and will see how that copes once I've learnt my way round it). Then I tried to get a flexible configuration, and that's where code bloat seemed to set in. I've tried to manage it back again by making lists of my attributes, and reusing those lists wherever I need them, I hope this class could serve as a pattern for any future classes with the minimum of editting. I understand the duck typing principle of try rather than test, but I prefer to have errors caught at the time I try to configure something, rather than later at the time I try to use it. I've tried to be as duck-like in my tests as possible, hoping to get the best of both worlds. I am not suggesting my tests are bomb-proof yet, I will test them more thoroughly in due course. My test for valid integers isn't quite as smart as I'd want it yet (accept 4, 0x11, '4', '0x11', reject 3.142) (int() covers enough of that ground for the moment), but that is a simpler issue to be tackled later. So my concerns are: 1) Before I use it as a pattern for other classes, have I done a reasonably pythonic job, or am I just kidding myself? 2) There seem to be a lot of lines of support, and very little payload, could the same effect have been acheived more efficiently? 3) In searching for timers, I've seen a lot of comments bemoaning the fact that Python libraries don't have a standard repeat timer. Is anybody going to run into trouble using this one? 4) Any other comments Thanks for your time to slog through what seems like a lot of code. import time, threading class Pacer(): """ A Pacer object can be configured at instantiation, using config(kwargs), or at start(kwargs) Call Pacer_obj.config() with no args to get a list of valid kwargs It calls func_tick every period, with non-cummulative error (if possible) Set max_ticks or max_overruns to zero to disable them """ def __init__(self,**kwargs): self.zpint_keys=['max_overruns','max_ticks'] self.pfloat_keys=['period'] self.func_keys=['func_tick','func_done','func_over'] self.private_keys=['N_ticks','N_overruns','t_next_tick'] for key in self.zpint_keys: setattr(self,key,0) for key in self.pfloat_keys: setattr(self,key,1) for key in self.func_keys: setattr(self,key,None) for key in self.private_keys: setattr(self,key,0) self.config(**kwargs) def spill(self): print for key in self.zpint_keys+self.pfloat_keys+self.func_keys+self.private_keys: print key, '=',getattr(self,key) print def start(self,**kwargs): self.config(**kwargs) self.N_ticks=0 self.N_overruns=0 self.t_next_tick=time.time()+self.period self.t=threading.Timer(self.period,self.tick) self.t.start() def tick(self): if self.func_tick: self.func_tick() else: print "you do realise you haven't defined a tick callback, don't you" self.N_ticks += 1 self.t_next_tick += self.period # have we reached maximum number of ticks? if (self.N_ticks >= self.max_ticks) and (self.max_ticks != 0): if self.func_done: self.func_done() else: print 'quit on max ticks, no callback defined' return # quit without scheduling another tick # OK, so still ticking # how long till next, with non-cummulative error time2wait=self.t_next_tick-time.time() if time2wait <= 0: # damn, we've overrun time2wait=0 # set to least time possible self.N_overruns += 1 # how many has that been? if (self.N_overruns >= self.max_overruns) and (self.max_overruns != 0): if self.func_over: self.func_over() else: print 'quit on too many missed schedules, no callback defined' return # quit without scheduling another tick # OK, so *still* ticking self.N_overruns=0 # reset the overrun counter self.t=threading.Timer(time2wait+0.001,self.tick) self.t.start() def stop(self): self.t.cancel() # and really nothing else needs to happen here # it stops the next tick from happening # which stops everything else def config(self,**kwargs): if not kwargs: usage={'non-neg integers':self.zpint_keys, 'positive floats':self.pfloat_keys, 'callback functions':self.func_keys} return usage for key in self.zpint_keys: if key in kwargs: keyval=kwargs.pop(key) try: val=int(keyval) if val<0: print 'parameter ',key, ' must be zero or positive' break except: print 'parameter ',key,' must be an integer' break setattr(self,key,val) for key in self.pfloat_keys: if key in kwargs: keyval=kwargs.pop(key) try: val=float(keyval) if val <= 0: print 'parameter ',key,' must be positive' break except TypeError: print 'parameter ',key,' must be a float' break setattr(self,key,val) for key in self.func_keys: if key in kwargs: keyval=kwargs.pop(key) if not callable(keyval): print 'parameter ',key,' must be callable function' break setattr(self,key,keyval) if kwargs: print 'unknown parameter(s) were supplied to Pacer.config()' print kwargs if __name__=='__main__': def hello(): print 'hello world' q=Pacer() q.spill() b=q.config() print b q.config(max_ticks=7.5) q.spill() q.config(interloper=3) q.config(func_tick=hello,max_ticks=3) q.spill() q.start() time.sleep(5) a=raw_input('press return to quit - ')
class
timer
python
null
null
06/24/2012 00:40:43
off topic
Style comments please on my timer class === I'm a relative noob to Python. On a range of 0 to 10, where 0 is a complete noob and 9 is Guido, I'd put myself as 1 aspiring to 2. So I wanted a timer, rather like the Visual Basic object, and I wanted it with no cummulative error. And I wanted it flexible, so I wouldn't have to write another one. I'm very lazy BTW, so lazy that I will go to great lengths to avoid having to write something a second time. Actually, this fits quite well with the "write once, refer often" coding style. I liked the flexibility of the .config() setup style used for Tk controls, so wanted to implement that. I spent a long time searching for timers, and there seemed to be about 3 basic types, I eventually settled on the threading.Timer repeat call model. I spent far too long battling with freezes in IDLE, before realising that my timers appeared to run OK standalone, and that IDLE just didn't like threads (I've just installed IPython, and will see how that copes once I've learnt my way round it). Then I tried to get a flexible configuration, and that's where code bloat seemed to set in. I've tried to manage it back again by making lists of my attributes, and reusing those lists wherever I need them, I hope this class could serve as a pattern for any future classes with the minimum of editting. I understand the duck typing principle of try rather than test, but I prefer to have errors caught at the time I try to configure something, rather than later at the time I try to use it. I've tried to be as duck-like in my tests as possible, hoping to get the best of both worlds. I am not suggesting my tests are bomb-proof yet, I will test them more thoroughly in due course. My test for valid integers isn't quite as smart as I'd want it yet (accept 4, 0x11, '4', '0x11', reject 3.142) (int() covers enough of that ground for the moment), but that is a simpler issue to be tackled later. So my concerns are: 1) Before I use it as a pattern for other classes, have I done a reasonably pythonic job, or am I just kidding myself? 2) There seem to be a lot of lines of support, and very little payload, could the same effect have been acheived more efficiently? 3) In searching for timers, I've seen a lot of comments bemoaning the fact that Python libraries don't have a standard repeat timer. Is anybody going to run into trouble using this one? 4) Any other comments Thanks for your time to slog through what seems like a lot of code. import time, threading class Pacer(): """ A Pacer object can be configured at instantiation, using config(kwargs), or at start(kwargs) Call Pacer_obj.config() with no args to get a list of valid kwargs It calls func_tick every period, with non-cummulative error (if possible) Set max_ticks or max_overruns to zero to disable them """ def __init__(self,**kwargs): self.zpint_keys=['max_overruns','max_ticks'] self.pfloat_keys=['period'] self.func_keys=['func_tick','func_done','func_over'] self.private_keys=['N_ticks','N_overruns','t_next_tick'] for key in self.zpint_keys: setattr(self,key,0) for key in self.pfloat_keys: setattr(self,key,1) for key in self.func_keys: setattr(self,key,None) for key in self.private_keys: setattr(self,key,0) self.config(**kwargs) def spill(self): print for key in self.zpint_keys+self.pfloat_keys+self.func_keys+self.private_keys: print key, '=',getattr(self,key) print def start(self,**kwargs): self.config(**kwargs) self.N_ticks=0 self.N_overruns=0 self.t_next_tick=time.time()+self.period self.t=threading.Timer(self.period,self.tick) self.t.start() def tick(self): if self.func_tick: self.func_tick() else: print "you do realise you haven't defined a tick callback, don't you" self.N_ticks += 1 self.t_next_tick += self.period # have we reached maximum number of ticks? if (self.N_ticks >= self.max_ticks) and (self.max_ticks != 0): if self.func_done: self.func_done() else: print 'quit on max ticks, no callback defined' return # quit without scheduling another tick # OK, so still ticking # how long till next, with non-cummulative error time2wait=self.t_next_tick-time.time() if time2wait <= 0: # damn, we've overrun time2wait=0 # set to least time possible self.N_overruns += 1 # how many has that been? if (self.N_overruns >= self.max_overruns) and (self.max_overruns != 0): if self.func_over: self.func_over() else: print 'quit on too many missed schedules, no callback defined' return # quit without scheduling another tick # OK, so *still* ticking self.N_overruns=0 # reset the overrun counter self.t=threading.Timer(time2wait+0.001,self.tick) self.t.start() def stop(self): self.t.cancel() # and really nothing else needs to happen here # it stops the next tick from happening # which stops everything else def config(self,**kwargs): if not kwargs: usage={'non-neg integers':self.zpint_keys, 'positive floats':self.pfloat_keys, 'callback functions':self.func_keys} return usage for key in self.zpint_keys: if key in kwargs: keyval=kwargs.pop(key) try: val=int(keyval) if val<0: print 'parameter ',key, ' must be zero or positive' break except: print 'parameter ',key,' must be an integer' break setattr(self,key,val) for key in self.pfloat_keys: if key in kwargs: keyval=kwargs.pop(key) try: val=float(keyval) if val <= 0: print 'parameter ',key,' must be positive' break except TypeError: print 'parameter ',key,' must be a float' break setattr(self,key,val) for key in self.func_keys: if key in kwargs: keyval=kwargs.pop(key) if not callable(keyval): print 'parameter ',key,' must be callable function' break setattr(self,key,keyval) if kwargs: print 'unknown parameter(s) were supplied to Pacer.config()' print kwargs if __name__=='__main__': def hello(): print 'hello world' q=Pacer() q.spill() b=q.config() print b q.config(max_ticks=7.5) q.spill() q.config(interloper=3) q.config(func_tick=hello,max_ticks=3) q.spill() q.start() time.sleep(5) a=raw_input('press return to quit - ')
2
8,842,325
01/12/2012 21:10:04
82,099
03/24/2009 16:18:12
423
4
Applying tdd on early stages
I have a question about applying tdd on early stages of development. Frequently, when starting developing a project, the client does not know exactly what the precise requirements are and consequently changes them after seeing the first prototypes. If we apply tdd from the very beginnning of the project, it turns out that a big portion of our tests (acceptance, integration, unit) will be soon either deleted or updated. Is this normal? If not, how to proceed at this initial phase of product development?
tdd
null
null
null
null
null
open
Applying tdd on early stages === I have a question about applying tdd on early stages of development. Frequently, when starting developing a project, the client does not know exactly what the precise requirements are and consequently changes them after seeing the first prototypes. If we apply tdd from the very beginnning of the project, it turns out that a big portion of our tests (acceptance, integration, unit) will be soon either deleted or updated. Is this normal? If not, how to proceed at this initial phase of product development?
0
3,630,020
09/02/2010 18:26:16
355,149
06/01/2010 07:04:38
184
20
Need help with a regular expression
I'm pulling out my hair over the following function: Public Function SetVersion(ByVal hl7Message As String, ByVal newVersion As String) As String Dim rgx = New Regex("^(?<pre>.+)(\|\d\.\d{1,2})$", RegexOptions.Multiline) Dim m = rgx.Match(hl7Message) Return rgx.Replace(hl7Message, "${pre}|" & newVersion, 1, 0) End Function For simplicity, I'm testing against the following input: dsfdsaf|2.1 wretdfg|2.2 sdafasd3|2.3 What I need to accomplish is replace "|2.1" in the *first* line with another value, say "|2.4". What is happening instead is that "|2.3" is getting replaced in the *last* line. It's as if I hadn't specified Multi-Line mode. Moreover, the following [online tool][1] returned correct matches. So, anyone who can see a mistake in my regex or code, please point it out. Thanks. [1]: http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx
.net
vb.net
regex
null
null
null
open
Need help with a regular expression === I'm pulling out my hair over the following function: Public Function SetVersion(ByVal hl7Message As String, ByVal newVersion As String) As String Dim rgx = New Regex("^(?<pre>.+)(\|\d\.\d{1,2})$", RegexOptions.Multiline) Dim m = rgx.Match(hl7Message) Return rgx.Replace(hl7Message, "${pre}|" & newVersion, 1, 0) End Function For simplicity, I'm testing against the following input: dsfdsaf|2.1 wretdfg|2.2 sdafasd3|2.3 What I need to accomplish is replace "|2.1" in the *first* line with another value, say "|2.4". What is happening instead is that "|2.3" is getting replaced in the *last* line. It's as if I hadn't specified Multi-Line mode. Moreover, the following [online tool][1] returned correct matches. So, anyone who can see a mistake in my regex or code, please point it out. Thanks. [1]: http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx
0
10,478,837
05/07/2012 08:20:22
1,242,422
03/01/2012 10:42:25
13
0
error: expected primary-expression before ')' token
I have a function void fun(int j, int i = 10); I want to invoke the fun by a macro function. #define fun1(x) fun(x, 10) #define fun1(x, y) fun(x, y) How can I achieve this?
c++
null
null
null
null
05/08/2012 18:49:17
not a real question
error: expected primary-expression before ')' token === I have a function void fun(int j, int i = 10); I want to invoke the fun by a macro function. #define fun1(x) fun(x, 10) #define fun1(x, y) fun(x, y) How can I achieve this?
1
8,942,882
01/20/2012 14:28:22
80,389
03/20/2009 09:02:36
817
21
what are (and the difference between) factories, service and util classes? Are there any more concepts in a software project?
I am trying to get my head around the concepts of a typical software project, but I cannot find a decent article concerning this. - What are factories? - What are services? - What are util classes? - And what are the key differences between them? (ex, what makes a factory not a service, etc) - And are there any more concepts in a software project that are common? Thanks for any decent explanations.
service
factory
development
util
null
01/24/2012 00:36:38
not constructive
what are (and the difference between) factories, service and util classes? Are there any more concepts in a software project? === I am trying to get my head around the concepts of a typical software project, but I cannot find a decent article concerning this. - What are factories? - What are services? - What are util classes? - And what are the key differences between them? (ex, what makes a factory not a service, etc) - And are there any more concepts in a software project that are common? Thanks for any decent explanations.
4
1,250,551
08/09/2009 03:54:19
16,371
09/17/2008 16:38:15
383
26
Live screencasting for both PC and Mac
This is not exactly very programming- but we are hosting a code hacking section every week. Now we have a guy left our origin and working oversea, but he still would like to join our event :) So the question is how can we do a live screencast from our Mac to him? The constraints are as follows: 1. It has to be live- not pre recorded. An option to both record the screen + live broadcast would be great. 2. Ideally have Linux + PC + Mac support 3. We are behind an uncontrollable NAT (we usually meet at public cafe) so probably a screencast server is required. Alternatively maybe a pull connection? (The other guy in the foreign place might have more control to the network) We tried DimDim (www.dimdim.com) and for some reason it just fail to work properly- too many glitches, somebody either couldn't join or screencast is not visible.
screencast
multi-platform
live
null
null
12/15/2010 13:56:00
off topic
Live screencasting for both PC and Mac === This is not exactly very programming- but we are hosting a code hacking section every week. Now we have a guy left our origin and working oversea, but he still would like to join our event :) So the question is how can we do a live screencast from our Mac to him? The constraints are as follows: 1. It has to be live- not pre recorded. An option to both record the screen + live broadcast would be great. 2. Ideally have Linux + PC + Mac support 3. We are behind an uncontrollable NAT (we usually meet at public cafe) so probably a screencast server is required. Alternatively maybe a pull connection? (The other guy in the foreign place might have more control to the network) We tried DimDim (www.dimdim.com) and for some reason it just fail to work properly- too many glitches, somebody either couldn't join or screencast is not visible.
2
7,731,561
10/11/2011 19:40:16
988,074
10/10/2011 16:45:53
1
0
C/C++ Cross Project Reference
I'm facing the basic problems of project components modularization / aggregation, and would appreciate some advice. Some details follow. Overview --- I need a tool which: - specify vcs components relationship, in a parent-child approach. - this description must be neat (xml, json, yaml, ...), and versioned. - actively process these descriptions, acquire the components, and build an Eclipse workspace. - facilitates the building of CDT projects (we have plenty here). - provides a top-level build trigger (mainly for agility reasons such as rapid technology transfer, CI, deploy, etc ...) Workspace ---- The main objective is to be able to automatically create a workspace (Eclipse is the favorite choice here) from the aggregation description. VCS Technology ---- Some dvcs, either mercurial or git will be used. We must be able to gather svn repos too. Source aggregation ---- Until the moment, it is mandatory that the workspace contains every single aggregated module source files. I know it is possible to work using only headers and already built components (as maven-nar inducts), but I consider it too much "the java's way". C/Cpp code maintanence may face some problems. (*Some opinion on this matter would be nice*) Tools and Techniques evaluated ---- - Maven-nar and Buckminster. Discarded for now. I'll leave my impressions and reasons on those tools below. - Mercurial subrepos is still not discarded, but is not very transparent on the specific versions of the aggregated components. - Git submodules do not support svn aggregation, and is discarded for this reason. Impressions on Tools ---- **Maven-nar** - Despite the already mentioned "java's way", maven-nar worked very smoothly. - Unfortunately It mixes build features to component aggregation features (results in a "not neat" project description). - Lacks good support for cross-compilation (we make embedded here), even tough it is always possible to workaround using maven's exec plugin and some pom hacking. - StackOverflow has tons of topics on maven-nar. **Buckminster** - Very very nice aggregation proposal. My eyes shone. - Overkill for my problem. I simply want remote component aggregation, not dynamic-intelligent-filtering-routing and eclipse's repositories, etc. - Terrible and misleading documentation. - Working examples do not work. - Proposal made on wiki to non-Java projects is a bit hacking-like. Need something more lika a "first-class feature" - StackOverflow has tons of topics on buckminster. My sad conclusion --- Actually not so sad. I plan to build a tool on my own. The main problems are dependency resolution while building the workspace, and top-level build trigger, which must not interfere on the building speed (too much). Some advice, please ?
c++
c
version-control
project-management
cross-compiling
10/11/2011 20:19:08
not a real question
C/C++ Cross Project Reference === I'm facing the basic problems of project components modularization / aggregation, and would appreciate some advice. Some details follow. Overview --- I need a tool which: - specify vcs components relationship, in a parent-child approach. - this description must be neat (xml, json, yaml, ...), and versioned. - actively process these descriptions, acquire the components, and build an Eclipse workspace. - facilitates the building of CDT projects (we have plenty here). - provides a top-level build trigger (mainly for agility reasons such as rapid technology transfer, CI, deploy, etc ...) Workspace ---- The main objective is to be able to automatically create a workspace (Eclipse is the favorite choice here) from the aggregation description. VCS Technology ---- Some dvcs, either mercurial or git will be used. We must be able to gather svn repos too. Source aggregation ---- Until the moment, it is mandatory that the workspace contains every single aggregated module source files. I know it is possible to work using only headers and already built components (as maven-nar inducts), but I consider it too much "the java's way". C/Cpp code maintanence may face some problems. (*Some opinion on this matter would be nice*) Tools and Techniques evaluated ---- - Maven-nar and Buckminster. Discarded for now. I'll leave my impressions and reasons on those tools below. - Mercurial subrepos is still not discarded, but is not very transparent on the specific versions of the aggregated components. - Git submodules do not support svn aggregation, and is discarded for this reason. Impressions on Tools ---- **Maven-nar** - Despite the already mentioned "java's way", maven-nar worked very smoothly. - Unfortunately It mixes build features to component aggregation features (results in a "not neat" project description). - Lacks good support for cross-compilation (we make embedded here), even tough it is always possible to workaround using maven's exec plugin and some pom hacking. - StackOverflow has tons of topics on maven-nar. **Buckminster** - Very very nice aggregation proposal. My eyes shone. - Overkill for my problem. I simply want remote component aggregation, not dynamic-intelligent-filtering-routing and eclipse's repositories, etc. - Terrible and misleading documentation. - Working examples do not work. - Proposal made on wiki to non-Java projects is a bit hacking-like. Need something more lika a "first-class feature" - StackOverflow has tons of topics on buckminster. My sad conclusion --- Actually not so sad. I plan to build a tool on my own. The main problems are dependency resolution while building the workspace, and top-level build trigger, which must not interfere on the building speed (too much). Some advice, please ?
1
10,202,893
04/18/2012 04:42:45
1,340,329
04/18/2012 04:32:09
1
0
Android : How to launch Pending intent from another activity with extras?
I am facing some problem with pending intents. I have set some Pending Intents using Notification Manager. These notification launch an activity when use click on them. I put some extras with Intent used in pending intent. This works OK with notification click. Notification notification = new Notification(icon, tickerText, when); Context context = getApplicationContext(); Intent intentOptionDialog = new Intent(Safety_Check_Service.this, Dialog_Safety_Check.class); intentOptionDialog.putExtra("startID",startId); intentOptionDialog.putExtra("CheckInID", CheckInId); intentOptionDialog.putExtra("Frequency", Frequency); intentOptionDialog.putExtra("flagFirstShedule", true); stopID = (startId + 17); intentOptionDialog.putExtra("stopID", stopID); PendingIntent contentIntent = PendingIntent.getActivity(Safety_Check_Service.this, DIALOG_ID, intentOptionDialog, 0); But my problem is that I want to launch these pending intents from another activity. The pending intents are created. How can I lauch these pending intents from another activity and how can I get Extras that was set with the pending intent? Please help me.
android
android-intent
pendingintent
extra
null
null
open
Android : How to launch Pending intent from another activity with extras? === I am facing some problem with pending intents. I have set some Pending Intents using Notification Manager. These notification launch an activity when use click on them. I put some extras with Intent used in pending intent. This works OK with notification click. Notification notification = new Notification(icon, tickerText, when); Context context = getApplicationContext(); Intent intentOptionDialog = new Intent(Safety_Check_Service.this, Dialog_Safety_Check.class); intentOptionDialog.putExtra("startID",startId); intentOptionDialog.putExtra("CheckInID", CheckInId); intentOptionDialog.putExtra("Frequency", Frequency); intentOptionDialog.putExtra("flagFirstShedule", true); stopID = (startId + 17); intentOptionDialog.putExtra("stopID", stopID); PendingIntent contentIntent = PendingIntent.getActivity(Safety_Check_Service.this, DIALOG_ID, intentOptionDialog, 0); But my problem is that I want to launch these pending intents from another activity. The pending intents are created. How can I lauch these pending intents from another activity and how can I get Extras that was set with the pending intent? Please help me.
0
7,199,245
08/26/2011 01:50:25
670,410
03/22/2011 01:10:23
43
0
How do I select rows where a column contains
here is the field in my table ![service_field][1] [1]: http://i.stack.imgur.com/AUmUm.png how do I select rows where a column contains only 5, not 15 if `SELECT * FROM `vendor` WHERE `services` LIKE '%5%'` it will select that have 15 too. any idea?
mysql
sql
null
null
null
null
open
How do I select rows where a column contains === here is the field in my table ![service_field][1] [1]: http://i.stack.imgur.com/AUmUm.png how do I select rows where a column contains only 5, not 15 if `SELECT * FROM `vendor` WHERE `services` LIKE '%5%'` it will select that have 15 too. any idea?
0
5,764,689
04/23/2011 14:18:48
487,244
06/18/2010 07:32:59
86
1
Is it vilolation of Clean Code to call init method in constructor like this
My concern in the code below is that the param to constructor is not actually directly mapped to the class's instance fields. The instance fields derive value from the parameter and for which I'm using the initalize method. Further, I do some stuff so that the object created can be used directly in the code that follows e.g. calling drawBoundaries(). I feel it's doing what is meant by creating(initializing) a Canvas in an abstract sense. Is my constructor doing too much? If I add methods to call the stuff in constructor explicitly from outside, that'll be wrong. Please let me know your views. public class Canvas { private int numberOfRows; private int numberOfColumns; private final List<Cell> listOfCells = new LinkedList<Cell>(); public Canvas(ParsedCells seedPatternCells) { initalizeCanvas(seedPatternCells); } private void initalizeCanvas(ParsedCells seedPatternCells) { setNumberOfRowsAndColumnsBasedOnSeedPatten(seedPatternCells); drawBoundaries(); placeSeedPatternCellsOnCanvas(seedPatternCells); } ... P.S.: Sorry if this looks like a silly question; my code is going to be reviewed by an OOP guru and I'm just worried :-0
java
oop
coding-style
null
null
null
open
Is it vilolation of Clean Code to call init method in constructor like this === My concern in the code below is that the param to constructor is not actually directly mapped to the class's instance fields. The instance fields derive value from the parameter and for which I'm using the initalize method. Further, I do some stuff so that the object created can be used directly in the code that follows e.g. calling drawBoundaries(). I feel it's doing what is meant by creating(initializing) a Canvas in an abstract sense. Is my constructor doing too much? If I add methods to call the stuff in constructor explicitly from outside, that'll be wrong. Please let me know your views. public class Canvas { private int numberOfRows; private int numberOfColumns; private final List<Cell> listOfCells = new LinkedList<Cell>(); public Canvas(ParsedCells seedPatternCells) { initalizeCanvas(seedPatternCells); } private void initalizeCanvas(ParsedCells seedPatternCells) { setNumberOfRowsAndColumnsBasedOnSeedPatten(seedPatternCells); drawBoundaries(); placeSeedPatternCellsOnCanvas(seedPatternCells); } ... P.S.: Sorry if this looks like a silly question; my code is going to be reviewed by an OOP guru and I'm just worried :-0
0
6,095,321
05/23/2011 09:29:40
387,635
07/09/2010 10:37:48
6
0
IIS6 + MVC3 + Dependency Injection error
I am developing a web application in MVC, tested in a iis7.5 server and everything works fine. However, when installing on production server I get the following error: [MissingMethodException: No parameterless constructor defined for this object.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241 System.Activator.CreateInstance(Type type, Boolean nonPublic) +69 System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +67 [InvalidOperationException: An error occurred when trying to create a controller of type 'MyApp.Controllers.CompanyController'. Make sure that the controller has a parameterless public constructor.] System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +182 System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +196 System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +49 System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +13 System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841400 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184 Alguien sabe a que se puede deber? PD: MVC3, EF4.1, Unity 2.0
.net
asp.net-mvc-3
frameworks
iis6
entity
null
open
IIS6 + MVC3 + Dependency Injection error === I am developing a web application in MVC, tested in a iis7.5 server and everything works fine. However, when installing on production server I get the following error: [MissingMethodException: No parameterless constructor defined for this object.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98 System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241 System.Activator.CreateInstance(Type type, Boolean nonPublic) +69 System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +67 [InvalidOperationException: An error occurred when trying to create a controller of type 'MyApp.Controllers.CompanyController'. Make sure that the controller has a parameterless public constructor.] System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +182 System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80 System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74 System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +196 System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +49 System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +13 System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22 System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8841400 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184 Alguien sabe a que se puede deber? PD: MVC3, EF4.1, Unity 2.0
0
4,673,706
01/12/2011 20:31:01
118,218
06/05/2009 18:42:23
742
36
Slow down CPU to simulate slower computers in browser testing
I'm trying to see how our web pages behave on an average customer's computer. We have not yet pinned down this configuration, but it's likely to be slower than what our developers and testers will have. I've seen answers to similar questions that suggest throttling bandwidth and using a VM where the memory has been limited, but do I also need to slow down the CPU? I am under the impression that the CPU will run fairly close to full speed, even in a VM. Are there virtual machine platforms that allow you to limit the CPU cycles? I saw one suggestion to run something like Folding @ Home, but I would welcome other suggestions to throttle the CPU speed. I've seen this question: http://stackoverflow.com/questions/1997089/how-to-slow-down-the-browser, and others that talk about limiting bandwidth.
performance
testing
virtualization
null
null
null
open
Slow down CPU to simulate slower computers in browser testing === I'm trying to see how our web pages behave on an average customer's computer. We have not yet pinned down this configuration, but it's likely to be slower than what our developers and testers will have. I've seen answers to similar questions that suggest throttling bandwidth and using a VM where the memory has been limited, but do I also need to slow down the CPU? I am under the impression that the CPU will run fairly close to full speed, even in a VM. Are there virtual machine platforms that allow you to limit the CPU cycles? I saw one suggestion to run something like Folding @ Home, but I would welcome other suggestions to throttle the CPU speed. I've seen this question: http://stackoverflow.com/questions/1997089/how-to-slow-down-the-browser, and others that talk about limiting bandwidth.
0
9,336,550
02/17/2012 22:49:50
947,301
09/15/2011 16:50:42
163
0
Ruby sprintf , about %02x
sprintf("%02x ",c) When I reading code ,I know this means transfer decimal to Hex. But what does "2" mean? Thank you.
ruby
null
null
null
null
null
open
Ruby sprintf , about %02x === sprintf("%02x ",c) When I reading code ,I know this means transfer decimal to Hex. But what does "2" mean? Thank you.
0
11,650,850
07/25/2012 13:29:46
1,533,628
07/18/2012 04:54:55
18
0
sql query phpmyadmin
Database phplogin > users id int 11 username varchar25 password varchar25 Whats the code to add 2 users 1 named Admin and pass: 123 other named: acc2 pass: pass2
sql
phpmyadmin
null
null
null
07/26/2012 01:14:52
too localized
sql query phpmyadmin === Database phplogin > users id int 11 username varchar25 password varchar25 Whats the code to add 2 users 1 named Admin and pass: 123 other named: acc2 pass: pass2
3
7,312,460
09/05/2011 20:25:21
355,253
06/01/2010 09:38:28
51
8
How to integrate ready database into new installed mssql
I need to configure and run ready web site. I installed apache and configured it.Now frontend of the web site works great. I need to configure the backend also. They used mssql 2005 and also sent me the database. I installed the express version of the mssql 2005, and now I don't know how to integrate ready database to the new installed mssql. Please help me to find out. Thank you in advance!
php
sql-server
apache
null
null
09/05/2011 22:58:14
not a real question
How to integrate ready database into new installed mssql === I need to configure and run ready web site. I installed apache and configured it.Now frontend of the web site works great. I need to configure the backend also. They used mssql 2005 and also sent me the database. I installed the express version of the mssql 2005, and now I don't know how to integrate ready database to the new installed mssql. Please help me to find out. Thank you in advance!
1
11,257,954
06/29/2012 07:44:20
1,490,544
06/29/2012 07:17:06
1
0
how do i create a frequency based heatmap off movement patterns for a mobile app
Please help. I need to create heatmaps based off frequency that a person goes to certain areas, that way can determine likes/dislikes based off a person's movement patterns for a mobile app for a certain social network (NDA). It runs even while the app isnt open. Thank you!!!
application
patterns
frequency
movement
heatmap
06/30/2012 08:39:08
not a real question
how do i create a frequency based heatmap off movement patterns for a mobile app === Please help. I need to create heatmaps based off frequency that a person goes to certain areas, that way can determine likes/dislikes based off a person's movement patterns for a mobile app for a certain social network (NDA). It runs even while the app isnt open. Thank you!!!
1
9,446,849
02/25/2012 18:36:48
609,391
02/09/2011 08:02:39
181
0
I am writing a jquery mobile app, and I want to submit a form, and have a completely different page load after submission. how?
I have just started to work with jquery mobile, and things are going swimmingly, but I have hit a wall. I have a form that I am trying to submit (post), and upon form submission, I would like the phone to behave just as a browser would behave. I want it to actually go to the page that I specify. Here is the scenerio I'm on the intro page. this intro page has 2 different "jquery mobile pages" on it. By "jquery mobile pages", I am talking about 2 different <div id="some_page" data-role="page"> The first of these two pages is a teaser page. It shows some of the information that the user wants to see, but not all. The url (the div id) to the first page is: bla.com/intro.php#first The second of these 2 pages is a simple registration page. This registration page contains a form. The url (or div id) to the second page is: bla.com/intro.php#second The form looks similar to the following: 72 <form data-ajax="false" action="#" id="signup" method="post"> 73 <input type="hidden" name="leadID" id="leadID" value="<?=$_GET['id']?>" /> 74 <input type="hidden" name="action" id="action" value="validate" /> 75 <input type="hidden" name="blaID" id="blaID" value="<?=$propertyID?>" / > 77 <ul id="regList" style="margin: 15px 2px 17px;"> 78 <li> 79 <input type="text" placeholder="First Name*" id="firstName" 80 </li> 81 </ul> 82 </form> The form does submit, and it is a post submission, and the post data is present. I know this because I am using the chrome dev tools to inspect the post submission. Here is the jquery mobile code that I am using to validate, and (attempt to) forward the page upon validation: 10 $('.submit').click(function(e){ 11 12 var isValid; 13 isValid = validateSignupFields($(this).attr('entry')); 14 15 if( isValid === true ) 16 { 17 //$('#signup').submit(); 18 $.mobile.changePage( 19 { 20 url: "fullInformation.php", 21 changeHash: true, 22 reloadPage: true, 23 type: "post", 24 data: $("signup").serialize() 25 }); 26 } 27 28 }); // end signupBtn click As I said earlier, the page does submit, and the next page does load, but the url does not change. The animation occurs, and the address bar still says bla.com#second. Further, the fullInformation.php page is all jumbled up, and there is no styling. I am wondering how I can submit the page, and have it act like the browser and just go to the following url instead of staying on the same url. Thanks!
jquery-mobile
null
null
null
null
null
open
I am writing a jquery mobile app, and I want to submit a form, and have a completely different page load after submission. how? === I have just started to work with jquery mobile, and things are going swimmingly, but I have hit a wall. I have a form that I am trying to submit (post), and upon form submission, I would like the phone to behave just as a browser would behave. I want it to actually go to the page that I specify. Here is the scenerio I'm on the intro page. this intro page has 2 different "jquery mobile pages" on it. By "jquery mobile pages", I am talking about 2 different <div id="some_page" data-role="page"> The first of these two pages is a teaser page. It shows some of the information that the user wants to see, but not all. The url (the div id) to the first page is: bla.com/intro.php#first The second of these 2 pages is a simple registration page. This registration page contains a form. The url (or div id) to the second page is: bla.com/intro.php#second The form looks similar to the following: 72 <form data-ajax="false" action="#" id="signup" method="post"> 73 <input type="hidden" name="leadID" id="leadID" value="<?=$_GET['id']?>" /> 74 <input type="hidden" name="action" id="action" value="validate" /> 75 <input type="hidden" name="blaID" id="blaID" value="<?=$propertyID?>" / > 77 <ul id="regList" style="margin: 15px 2px 17px;"> 78 <li> 79 <input type="text" placeholder="First Name*" id="firstName" 80 </li> 81 </ul> 82 </form> The form does submit, and it is a post submission, and the post data is present. I know this because I am using the chrome dev tools to inspect the post submission. Here is the jquery mobile code that I am using to validate, and (attempt to) forward the page upon validation: 10 $('.submit').click(function(e){ 11 12 var isValid; 13 isValid = validateSignupFields($(this).attr('entry')); 14 15 if( isValid === true ) 16 { 17 //$('#signup').submit(); 18 $.mobile.changePage( 19 { 20 url: "fullInformation.php", 21 changeHash: true, 22 reloadPage: true, 23 type: "post", 24 data: $("signup").serialize() 25 }); 26 } 27 28 }); // end signupBtn click As I said earlier, the page does submit, and the next page does load, but the url does not change. The animation occurs, and the address bar still says bla.com#second. Further, the fullInformation.php page is all jumbled up, and there is no styling. I am wondering how I can submit the page, and have it act like the browser and just go to the following url instead of staying on the same url. Thanks!
0
6,177,916
05/30/2011 15:03:50
314,488
01/12/2010 05:02:26
15,020
795
How to read shared file from Ubantu/Sambha using C#?
I have shared folder on ubantu/shamba server of my network. I am running my c# code form Vista , so How can i read file shared on ubantu/shamba server ?
c#
windows
ubantu
shared-file
null
null
open
How to read shared file from Ubantu/Sambha using C#? === I have shared folder on ubantu/shamba server of my network. I am running my c# code form Vista , so How can i read file shared on ubantu/shamba server ?
0
5,208,557
03/06/2011 03:48:20
219,166
11/26/2009 06:43:26
1,301
87
Passing args to a JS command line utility (Node or Narwhal)
I want to use NodeJS or Narwhal to create a JS utility which takes an argument, like so: $ node myscript.js http://someurl.com/for/somefile.js or $ js myscript.js http://someurl.com/for/somefile.js but I'm wondering how I can get that argument within my script, or if that is even possible atm? Thanks.
javascript
node.js
narwhal
null
null
null
open
Passing args to a JS command line utility (Node or Narwhal) === I want to use NodeJS or Narwhal to create a JS utility which takes an argument, like so: $ node myscript.js http://someurl.com/for/somefile.js or $ js myscript.js http://someurl.com/for/somefile.js but I'm wondering how I can get that argument within my script, or if that is even possible atm? Thanks.
0
5,274,501
03/11/2011 15:00:39
261,050
01/28/2010 14:25:18
1
0
Windows Workflow Foundation WF4 - Workflow hosting
For a client the system we're creating must support the following: - It must be possible to run multiple workflows, and multiple instances of the same workflows with a different context (different data/business objects). - Some workflows will be long-running, involve multiple users/client session and waiting for external user input. So the workflows must be able to be persisted and respond to some signal from a client app. And it also means that the execution of workflows must be done on a server app (right?). - I want to be able to run all kinds of workflows on the server app, and I do not want to have to re-deploy the server app when a workflow changes. My first thought was Workflow Services. After a lot of research I concluded that this is not the right path since Workflow Services basically gives the possibility to execute activities at a remote location from a workflow started in a client app. Is this correct? Or can I use Workflow Services for the scenario above? Most examples and/or tutorials are basically a ReceiveSignal/Send combination with some logic in between. Basically I want to initiate (from a client app) the start of a workflow with a specific context (in the workflow server app). What is the best approach? Any help is very much appreciated!
c#
.net
microsoft
workflow
workflow-foundation-4
null
open
Windows Workflow Foundation WF4 - Workflow hosting === For a client the system we're creating must support the following: - It must be possible to run multiple workflows, and multiple instances of the same workflows with a different context (different data/business objects). - Some workflows will be long-running, involve multiple users/client session and waiting for external user input. So the workflows must be able to be persisted and respond to some signal from a client app. And it also means that the execution of workflows must be done on a server app (right?). - I want to be able to run all kinds of workflows on the server app, and I do not want to have to re-deploy the server app when a workflow changes. My first thought was Workflow Services. After a lot of research I concluded that this is not the right path since Workflow Services basically gives the possibility to execute activities at a remote location from a workflow started in a client app. Is this correct? Or can I use Workflow Services for the scenario above? Most examples and/or tutorials are basically a ReceiveSignal/Send combination with some logic in between. Basically I want to initiate (from a client app) the start of a workflow with a specific context (in the workflow server app). What is the best approach? Any help is very much appreciated!
0
8,984,998
01/24/2012 10:09:58
1,166,699
01/24/2012 09:57:50
1
0
How different is web3.0 in terms of User Interface or from a front end developer perspective
How different is web3.0 in terms of User Interface or from a front end developer perspective..Is it jus the technology we use to create the web ( html5 / CSS3 ) or the way we use them... To b more precise.. when can we say a web application is completely in web3.0 standards...
web3.0
null
null
null
null
01/25/2012 13:00:06
not constructive
How different is web3.0 in terms of User Interface or from a front end developer perspective === How different is web3.0 in terms of User Interface or from a front end developer perspective..Is it jus the technology we use to create the web ( html5 / CSS3 ) or the way we use them... To b more precise.. when can we say a web application is completely in web3.0 standards...
4
8,135,052
11/15/2011 10:41:45
804,517
06/18/2011 12:51:18
8
0
Radio button list inside jquery template using knockout
I am using knockout with jquery template, I am stuck in a place in my template. Let me show you the code first. Here is my template <script type="text/x-jquery-tmpl" id="questionTemplate"> <div class="questions"> <div data-bind="text: QuestionText" style="font-weight:bold;"></div> {{if QuestionType == "FreeForm" }} <textarea rows="3" cols="50" data-bind="value: ResponseValue"></textarea> {{/if}} {{if QuestionType != "FreeForm" }} <table> {{each(i,option) Options}} <tr> <td> <input type="radio" data-bind="attr:{name:QuestionId},click:function(){ResponseValue=option.Value;}" />${option.Value}</td><td>- ${option.ResponsePercent} %</td> </tr> {{/each}} </table> {{/if}} </div> </script> And here is how I am using it <div data-bind="template:{name:'questionTemplate',foreach:questionResponses()}"> So what basically it is doing is it is looping for each question response and checks if question type is FreeForm then it creates a textarea else it picks questionResponse's object array property "Options" and uses jquery {{each}} to show each option as a radio button. And on submit I am picking the "ResponseValue" property's value, if it is textarea then I get textarea value or else I get selected radio button's value. This all is working perfectly fine. This is how it looks in UI 1. Tell me about yourself [A Text Area Since it is a FreeForm Question] 2. How much you will rate yourself in MVC3? RadioButton1 RadioButton2 RadioButton3 3. Blah Blah Blah? RadioButton1 RadioButton2 RadioButton3 RadioButton4 RadioButton5 RadioButton6 ... so.. on.. The only and small issue stuck me is, it does not allow me to change my selection, I mean say if I select RadioButton1 for question 2 then it does not allow me to select RadioButton2 or 3, same goes for each question. This happens in firefox. While IE 9 doesn't even allow to select any of radio button in the page. Any help will be appreciable Thanks in advance
knockout.js
jquery-templates
null
null
null
null
open
Radio button list inside jquery template using knockout === I am using knockout with jquery template, I am stuck in a place in my template. Let me show you the code first. Here is my template <script type="text/x-jquery-tmpl" id="questionTemplate"> <div class="questions"> <div data-bind="text: QuestionText" style="font-weight:bold;"></div> {{if QuestionType == "FreeForm" }} <textarea rows="3" cols="50" data-bind="value: ResponseValue"></textarea> {{/if}} {{if QuestionType != "FreeForm" }} <table> {{each(i,option) Options}} <tr> <td> <input type="radio" data-bind="attr:{name:QuestionId},click:function(){ResponseValue=option.Value;}" />${option.Value}</td><td>- ${option.ResponsePercent} %</td> </tr> {{/each}} </table> {{/if}} </div> </script> And here is how I am using it <div data-bind="template:{name:'questionTemplate',foreach:questionResponses()}"> So what basically it is doing is it is looping for each question response and checks if question type is FreeForm then it creates a textarea else it picks questionResponse's object array property "Options" and uses jquery {{each}} to show each option as a radio button. And on submit I am picking the "ResponseValue" property's value, if it is textarea then I get textarea value or else I get selected radio button's value. This all is working perfectly fine. This is how it looks in UI 1. Tell me about yourself [A Text Area Since it is a FreeForm Question] 2. How much you will rate yourself in MVC3? RadioButton1 RadioButton2 RadioButton3 3. Blah Blah Blah? RadioButton1 RadioButton2 RadioButton3 RadioButton4 RadioButton5 RadioButton6 ... so.. on.. The only and small issue stuck me is, it does not allow me to change my selection, I mean say if I select RadioButton1 for question 2 then it does not allow me to select RadioButton2 or 3, same goes for each question. This happens in firefox. While IE 9 doesn't even allow to select any of radio button in the page. Any help will be appreciable Thanks in advance
0
8,058,258
11/08/2011 22:58:19
1,036,607
11/08/2011 22:48:58
1
0
like and send buttons for a cupon site
i have implemented on my website the like and send buttons for each offer that i post there. The problem now is that when an user likes any of the offers(pages) it shows on his wall a standard picture and a standard text from my website. My question is: What do i have to do so that when an user hits the like button, that on his wall will be posted the offer's image and the offer's text ? I mean, how is it possible that the like button extracts what i need from the website page and then post it on my users wall. thank u for your answers. looking forward,
like
null
null
null
null
11/09/2011 23:30:30
not a real question
like and send buttons for a cupon site === i have implemented on my website the like and send buttons for each offer that i post there. The problem now is that when an user likes any of the offers(pages) it shows on his wall a standard picture and a standard text from my website. My question is: What do i have to do so that when an user hits the like button, that on his wall will be posted the offer's image and the offer's text ? I mean, how is it possible that the like button extracts what i need from the website page and then post it on my users wall. thank u for your answers. looking forward,
1
9,875,468
03/26/2012 15:56:46
659,547
03/14/2011 20:58:13
89
2
Printing newline in MIPS
I'm using MARS MIPS simulator and I want to print a newline in my program. .data space: .asciiz "\n" .text addi $v0, $zero, 4 # print_string syscall la $a0, space # load address of the string syscall Instead of printing newline, it prints `UUUU`. What's that I'm doing wrong?
mips
syscall
null
null
null
null
open
Printing newline in MIPS === I'm using MARS MIPS simulator and I want to print a newline in my program. .data space: .asciiz "\n" .text addi $v0, $zero, 4 # print_string syscall la $a0, space # load address of the string syscall Instead of printing newline, it prints `UUUU`. What's that I'm doing wrong?
0
3,497,520
08/16/2010 21:28:21
239,375
12/28/2009 02:59:40
116
1
Proper way to include files
I am trying to keep a somewhat organized directory structure as I plan to add more and more scripts. So lets say I have a structure like this: /src/main.py /src/db/<all my DB conn & table manipulation scripts> /src/api/<all my scripts that call different APIs> My main.py script will include certain classes from db & api folders as needed. I have the blank _____init_____.py files in each folder so they are included fine. But say I want to include a class from the db folder in a script in the api folder? Like I would need to back up one dir somehow? The api scripts fail when I have a line like this in them: from db.Conn import QADB I am on v2.6.
python
null
null
null
null
null
open
Proper way to include files === I am trying to keep a somewhat organized directory structure as I plan to add more and more scripts. So lets say I have a structure like this: /src/main.py /src/db/<all my DB conn & table manipulation scripts> /src/api/<all my scripts that call different APIs> My main.py script will include certain classes from db & api folders as needed. I have the blank _____init_____.py files in each folder so they are included fine. But say I want to include a class from the db folder in a script in the api folder? Like I would need to back up one dir somehow? The api scripts fail when I have a line like this in them: from db.Conn import QADB I am on v2.6.
0
1,637,738
10/28/2009 14:46:43
191,731
10/17/2009 16:10:15
21
0
iPhone UITableView PlainStyle with custom background image - done "entirely" in code.
I have been all over the place, seems the UITableView with a static background issue is well documented, but no one with a straight forward solution? Im building my TableViews entirely in code, like this: UIViewController *tableViewController = [[TableViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController]; [tableViewController release]; [window addSubview:navigationController.view]; The window is my main UIWindow build for me in the app delegate. From here on I need to build a few different TableViews (controlled by the navigationController), some with fetchedResultsControllers, custom cells and so on. I prefer to do this completely in code, not using nib's as this would result in either having customization spread between code and IB or having to build and maintain 6+ different Nibs. I simply can't find a working example where a tableViewController Class sets it's own background image. If I do this inside one of my TableViews (extending UITableViewController): self.tableView.backgroundColor = backgroundColor; I, of course, get the tableView's background colored (which incidentally colors the cell's as well, think the cell's inherits their color from the tableView?) but I wish to have a static background image that my cells slide up and down on top of. Not a "background image" that slides up and down with the users gestures. Exactly what the GroupedStyle tableView offers, but in a PlainStyle tableView:) .. and done using code, not IB. I guess I have to clear the background color of the table view, then set the Cells color when configuring them so they don't turn out transparent. And then somehow "sneak" a background image below the tableView view from inside the tableView instance? How will I go about this, the best solution would to be able to do this in viewDidLoad or any other function inside my TableViewController, to keep all my customization in one place. Hope someone can help me, Im all 'googled out' :) Thanks!
uitableview
iphone
background-image
uitableviewcontroller
null
null
open
iPhone UITableView PlainStyle with custom background image - done "entirely" in code. === I have been all over the place, seems the UITableView with a static background issue is well documented, but no one with a straight forward solution? Im building my TableViews entirely in code, like this: UIViewController *tableViewController = [[TableViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:tableViewController]; [tableViewController release]; [window addSubview:navigationController.view]; The window is my main UIWindow build for me in the app delegate. From here on I need to build a few different TableViews (controlled by the navigationController), some with fetchedResultsControllers, custom cells and so on. I prefer to do this completely in code, not using nib's as this would result in either having customization spread between code and IB or having to build and maintain 6+ different Nibs. I simply can't find a working example where a tableViewController Class sets it's own background image. If I do this inside one of my TableViews (extending UITableViewController): self.tableView.backgroundColor = backgroundColor; I, of course, get the tableView's background colored (which incidentally colors the cell's as well, think the cell's inherits their color from the tableView?) but I wish to have a static background image that my cells slide up and down on top of. Not a "background image" that slides up and down with the users gestures. Exactly what the GroupedStyle tableView offers, but in a PlainStyle tableView:) .. and done using code, not IB. I guess I have to clear the background color of the table view, then set the Cells color when configuring them so they don't turn out transparent. And then somehow "sneak" a background image below the tableView view from inside the tableView instance? How will I go about this, the best solution would to be able to do this in viewDidLoad or any other function inside my TableViewController, to keep all my customization in one place. Hope someone can help me, Im all 'googled out' :) Thanks!
0
9,970,222
04/02/2012 02:25:43
629,335
02/18/2011 10:29:57
3,250
96
SignalR - enumerate available hubs and hub methods from .NET client
Is there (or will be) a way to enumerate all the available hubs and methods of those from inside C# client? Haven't seen anything like that in the `SignalR.Client` library, but maybe I'm missing something? There's no problem in doing that in JS client, though, as all info is already here in the JS code.
c#
.net
signalr
null
null
null
open
SignalR - enumerate available hubs and hub methods from .NET client === Is there (or will be) a way to enumerate all the available hubs and methods of those from inside C# client? Haven't seen anything like that in the `SignalR.Client` library, but maybe I'm missing something? There's no problem in doing that in JS client, though, as all info is already here in the JS code.
0
9,790,712
03/20/2012 16:19:45
51,142
01/03/2009 12:54:34
137
6
File mapping and serialization
I want to map an existing file into any object which is serializable, but I don't know which library can help me. The idea is that RemoteActor will reply with pre-processed file. Unfortunately, it can't send any data and if I reply with MappedByteBuffer I will got > scala.actors.remote.DelegateActor@b035079: caught java.io.NotSerializableException: scala.actors.MQueue > java.io.NotSerializableException: scala.actors.MQueue
java
file
scala
mapping
serializable
03/20/2012 23:48:48
not a real question
File mapping and serialization === I want to map an existing file into any object which is serializable, but I don't know which library can help me. The idea is that RemoteActor will reply with pre-processed file. Unfortunately, it can't send any data and if I reply with MappedByteBuffer I will got > scala.actors.remote.DelegateActor@b035079: caught java.io.NotSerializableException: scala.actors.MQueue > java.io.NotSerializableException: scala.actors.MQueue
1
8,101,486
11/12/2011 00:24:33
420,001
08/13/2010 20:58:34
1,901
94
WP7 - Positioning AdControl
Is there an easy way to position an AdControl inside of a Panorama? Right now, I can only get my AdControl to show if I set up my object tree like so: Layout Root > Panorama > ... > AdControl1 That is, with both my Panorama and my AdControl as immediate children of LayoutRoot. I only want to show my AdControl on the first PanoramaItem, but when I do this, it fail to render: LayoutRoot > Panorama > PanoramaItem > StackPanel > ListBox > AdControl That is, I want my AdControl to be underneath my ListBox, stuck to the bottom of that PanoramaItem only. What am I missing?
c#
windows-phone-7
advertisement
expression-blend-4
null
null
open
WP7 - Positioning AdControl === Is there an easy way to position an AdControl inside of a Panorama? Right now, I can only get my AdControl to show if I set up my object tree like so: Layout Root > Panorama > ... > AdControl1 That is, with both my Panorama and my AdControl as immediate children of LayoutRoot. I only want to show my AdControl on the first PanoramaItem, but when I do this, it fail to render: LayoutRoot > Panorama > PanoramaItem > StackPanel > ListBox > AdControl That is, I want my AdControl to be underneath my ListBox, stuck to the bottom of that PanoramaItem only. What am I missing?
0
11,264,030
06/29/2012 14:52:09
1,169,575
01/25/2012 15:52:52
145
2
Rails gem to add view content
since often I'm comparing production and development website output, it happens sometimes I try to see latest development edits on the live website (just because they're equal, I don't see the URLbar address) and I lose minutes before to realize I was just looking at the production website. So I'm willing to create a Rails3 Gem that has to be installed under the "development" group, that automatically adds some output to all views (for example a warning message "DEVELOPMENT MODE" or something like that, and maybe add at the bottom some debug info about the current page). I've realized I could do this by creating some view helper, returning `nil` if the environment is "production", but it would require to install the gem globally to make it find the view helper also on a production server. So I'm just trying to figure out if there's another way less intrusive to add such content. Is there?
ruby-on-rails
ruby
ruby-on-rails-3
views
null
null
open
Rails gem to add view content === since often I'm comparing production and development website output, it happens sometimes I try to see latest development edits on the live website (just because they're equal, I don't see the URLbar address) and I lose minutes before to realize I was just looking at the production website. So I'm willing to create a Rails3 Gem that has to be installed under the "development" group, that automatically adds some output to all views (for example a warning message "DEVELOPMENT MODE" or something like that, and maybe add at the bottom some debug info about the current page). I've realized I could do this by creating some view helper, returning `nil` if the environment is "production", but it would require to install the gem globally to make it find the view helper also on a production server. So I'm just trying to figure out if there's another way less intrusive to add such content. Is there?
0
11,084,024
06/18/2012 13:33:46
1,407,785
05/21/2012 11:51:50
1
0
How to make user info tracking in iphone game
I am creating an iphone game that can be played by many users .. i want to track users'info:score, current level and many other information to be saved globally in the application .. do you know how i can make such a feature ?
iphone
ios
null
null
null
06/20/2012 12:14:29
not a real question
How to make user info tracking in iphone game === I am creating an iphone game that can be played by many users .. i want to track users'info:score, current level and many other information to be saved globally in the application .. do you know how i can make such a feature ?
1
8,064,403
11/09/2011 11:33:37
548,218
12/20/2010 04:58:32
638
32
SIpdroid app moves to background
I initiated call from Sipdroid 5-6 times repeatedly. but the application hangs for sometime and moves to background. **Please Help** **Logcat Says:** 11-09 12:36:07.311: D/dalvikvm(13494): GC_FOR_MALLOC freed 5 objects / 55880 bytes in 53ms 11-09 12:36:07.366: D/dalvikvm(13494): GC_FOR_MALLOC freed 109 objects / 464328 bytes in 50ms 11-09 12:36:07.416: D/dalvikvm(13494): GC_FOR_MALLOC freed 19 objects / 179672 bytes in 50ms 11-09 12:36:07.467: D/dalvikvm(13494): GC_FOR_MALLOC freed 257 objects / 625464 bytes in 50ms 11-09 12:36:07.522: D/dalvikvm(13494): GC_FOR_MALLOC freed 90 objects / 347384 bytes in 50ms 11-09 12:36:07.573: D/dalvikvm(13494): GC_FOR_MALLOC freed 85 objects / 382752 bytes in 49ms 11-09 12:36:07.620: D/dalvikvm(13494): GC_FOR_MALLOC freed 1 objects / 8240 bytes in 49ms 11-09 12:36:07.623: I/dalvikvm-heap(13494): Grow heap (frag case) to 11.079MB for 28450-byte allocation 11-09 12:36:07.670: D/dalvikvm(13494): GC_FOR_MALLOC freed 4 objects / 18960 bytes in 49ms 11-09 12:36:07.725: D/dalvikvm(13494): GC_FOR_MALLOC freed 40 objects / 347144 bytes in 49ms 11-09 12:36:10.534: D/dalvikvm(13494): GC_FOR_MALLOC freed 136 objects / 325296 bytes in 50ms 11-09 12:36:10.546: W/dalvikvm(13494): HeapWorker may be wedged: 5021ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.584: D/dalvikvm(13494): GC_FOR_MALLOC freed 36 objects / 195136 bytes in 49ms 11-09 12:36:10.597: W/dalvikvm(13494): HeapWorker may be wedged: 5072ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.635: D/dalvikvm(13494): GC_FOR_MALLOC freed 41 objects / 237328 bytes in 50ms 11-09 12:36:10.647: W/dalvikvm(13494): HeapWorker may be wedged: 5123ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.686: D/dalvikvm(13494): GC_FOR_MALLOC freed 35 objects / 224792 bytes in 50ms 11-09 12:36:10.702: W/dalvikvm(13494): HeapWorker may be wedged: 5177ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.741: D/dalvikvm(13494): GC_FOR_MALLOC freed 255 objects / 621728 bytes in 51ms 11-09 12:36:10.754: W/dalvikvm(13494): HeapWorker may be wedged: 5228ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.791: D/dalvikvm(13494): GC_FOR_MALLOC freed 4 objects / 31832 bytes in 50ms 11-09 12:36:10.791: I/dalvikvm-heap(13494): Grow heap (frag case) to 11.224MB for 19274-byte allocation 11-09 12:36:10.803: W/dalvikvm(13494): HeapWorker may be wedged: 5279ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.842: D/dalvikvm(13494): GC_FOR_MALLOC freed 0 objects / 0 bytes in 51ms 11-09 12:36:12.269: W/dalvikvm(13494): HeapWorker may be wedged: 6743ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.311: D/dalvikvm(13494): GC_FOR_MALLOC freed 251 objects / 594632 bytes in 53ms 11-09 12:36:12.323: W/dalvikvm(13494): HeapWorker may be wedged: 6798ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.362: D/dalvikvm(13494): GC_FOR_MALLOC freed 16 objects / 142608 bytes in 50ms 11-09 12:36:12.375: W/dalvikvm(13494): HeapWorker may be wedged: 6849ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.412: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 256888 bytes in 50ms 11-09 12:36:12.424: W/dalvikvm(13494): HeapWorker may be wedged: 6901ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.467: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 263624 bytes in 50ms 11-09 12:36:12.475: W/dalvikvm(13494): HeapWorker may be wedged: 6952ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.518: D/dalvikvm(13494): GC_FOR_MALLOC freed 16 objects / 145840 bytes in 50ms 11-09 12:36:12.526: W/dalvikvm(13494): HeapWorker may be wedged: 7003ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.565: D/dalvikvm(13494): GC_FOR_MALLOC freed 6 objects / 65832 bytes in 49ms 11-09 12:36:12.577: W/dalvikvm(13494): HeapWorker may be wedged: 7054ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.620: D/dalvikvm(13494): GC_FOR_MALLOC freed 57 objects / 377928 bytes in 50ms 11-09 12:36:12.627: W/dalvikvm(13494): HeapWorker may be wedged: 7105ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.670: D/dalvikvm(13494): GC_FOR_MALLOC freed 23 objects / 219096 bytes in 50ms 11-09 12:36:12.684: W/dalvikvm(13494): HeapWorker may be wedged: 7159ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.721: D/dalvikvm(13494): GC_FOR_MALLOC freed 265 objects / 667288 bytes in 50ms 11-09 12:36:12.733: W/dalvikvm(13494): HeapWorker may be wedged: 7211ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.776: D/dalvikvm(13494): GC_FOR_MALLOC freed 80 objects / 392208 bytes in 50ms 11-09 12:36:12.789: W/dalvikvm(13494): HeapWorker may be wedged: 7263ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.827: D/dalvikvm(13494): GC_FOR_MALLOC freed 65 objects / 387080 bytes in 50ms 11-09 12:36:12.840: W/dalvikvm(13494): HeapWorker may be wedged: 7314ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.877: D/dalvikvm(13494): GC_FOR_MALLOC freed 10 objects / 125504 bytes in 50ms 11-09 12:36:12.889: W/dalvikvm(13494): HeapWorker may be wedged: 7367ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.932: D/dalvikvm(13494): GC_FOR_MALLOC freed 92 objects / 417960 bytes in 51ms 11-09 12:36:12.945: W/dalvikvm(13494): HeapWorker may be wedged: 7420ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.983: D/dalvikvm(13494): GC_FOR_MALLOC freed 76 objects / 390168 bytes in 50ms 11-09 12:36:12.995: W/dalvikvm(13494): HeapWorker may be wedged: 7472ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.038: D/dalvikvm(13494): GC_FOR_MALLOC freed 35 objects / 269872 bytes in 51ms 11-09 12:36:13.050: W/dalvikvm(13494): HeapWorker may be wedged: 7524ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.088: D/dalvikvm(13494): GC_FOR_MALLOC freed 10 objects / 111296 bytes in 51ms 11-09 12:36:13.100: W/dalvikvm(13494): HeapWorker may be wedged: 7575ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.139: D/dalvikvm(13494): GC_FOR_MALLOC freed 21 objects / 183832 bytes in 50ms 11-09 12:36:13.151: W/dalvikvm(13494): HeapWorker may be wedged: 7626ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.190: D/dalvikvm(13494): GC_FOR_MALLOC freed 24 objects / 212448 bytes in 49ms 11-09 12:36:13.204: W/dalvikvm(13494): HeapWorker may be wedged: 7678ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.241: D/dalvikvm(13494): GC_FOR_MALLOC freed 264 objects / 674096 bytes in 50ms 11-09 12:36:13.252: W/dalvikvm(13494): HeapWorker may be wedged: 7730ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.295: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 317672 bytes in 53ms 11-09 12:36:13.307: W/dalvikvm(13494): HeapWorker may be wedged: 7785ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.350: D/dalvikvm(13494): GC_FOR_MALLOC freed 19 objects / 216696 bytes in 50ms 11-09 12:36:13.362: W/dalvikvm(13494): HeapWorker may be wedged: 7837ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.401: D/dalvikvm(13494): GC_FOR_MALLOC freed 61 objects / 375176 bytes in 50ms 11-09 12:36:13.413: W/dalvikvm(13494): HeapWorker may be wedged: 7888ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.452: D/dalvikvm(13494): GC_FOR_MALLOC freed 14 objects / 165416 bytes in 50ms 11-09 12:36:13.467: W/dalvikvm(13494): HeapWorker may be wedged: 7941ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.506: D/dalvikvm(13494): GC_FOR_MALLOC freed 248 objects / 680472 bytes in 50ms 11-09 12:36:13.514: W/dalvikvm(13494): HeapWorker may be wedged: 7992ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.557: D/dalvikvm(13494): GC_FOR_MALLOC freed 21 objects / 206032 bytes in 50ms 11-09 12:36:13.565: W/dalvikvm(13494): HeapWorker may be wedged: 8043ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.608: D/dalvikvm(13494): GC_FOR_MALLOC freed 14 objects / 138704 bytes in 50ms 11-09 12:36:13.622: W/dalvikvm(13494): HeapWorker may be wedged: 8096ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.663: D/dalvikvm(13494): GC_FOR_MALLOC freed 263 objects / 665216 bytes in 51ms 11-09 12:36:13.670: W/dalvikvm(13494): HeapWorker may be wedged: 8149ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.713: D/dalvikvm(13494): GC_FOR_MALLOC freed 51 objects / 353464 bytes in 50ms 11-09 12:36:13.726: W/dalvikvm(13494): HeapWorker may be wedged: 8200ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.764: D/dalvikvm(13494): GC_FOR_MALLOC freed 23 objects / 206880 bytes in 50ms 11-09 12:36:13.779: W/dalvikvm(13494): HeapWorker may be wedged: 8254ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.819: D/dalvikvm(13494): GC_FOR_MALLOC freed 216 objects / 635192 bytes in 51ms 11-09 12:36:13.831: W/dalvikvm(13494): HeapWorker may be wedged: 8306ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.870: D/dalvikvm(13494): GC_FOR_MALLOC freed 55 objects / 349400 bytes in 50ms 11-09 12:36:13.882: W/dalvikvm(13494): HeapWorker may be wedged: 8357ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.920: D/dalvikvm(13494): GC_FOR_MALLOC freed 5 objects / 54504 bytes in 50ms 11-09 12:36:13.932: W/dalvikvm(13494): HeapWorker may be wedged: 8408ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.971: D/dalvikvm(13494): GC_FOR_MALLOC freed 29 objects / 235160 bytes in 50ms 11-09 12:36:13.983: W/dalvikvm(13494): HeapWorker may be wedged: 8460ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.030: D/dalvikvm(13494): GC_FOR_MALLOC freed 51 objects / 337648 bytes in 57ms 11-09 12:36:14.043: W/dalvikvm(13494): HeapWorker may be wedged: 8518ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.080: D/dalvikvm(13494): GC_FOR_MALLOC freed 57 objects / 328160 bytes in 50ms 11-09 12:36:14.092: W/dalvikvm(13494): HeapWorker may be wedged: 8570ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.131: D/dalvikvm(13494): GC_FOR_MALLOC freed 80 objects / 377536 bytes in 50ms 11-09 12:36:14.143: W/dalvikvm(13494): HeapWorker may be wedged: 8621ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.186: D/dalvikvm(13494): GC_FOR_MALLOC freed 69 objects / 336952 bytes in 50ms 11-09 12:36:14.198: W/dalvikvm(13494): HeapWorker may be wedged: 8672ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.241: D/dalvikvm(13494): GC_FOR_MALLOC freed 16 objects / 130760 bytes in 52ms 11-09 12:36:14.248: W/dalvikvm(13494): HeapWorker may be wedged: 8726ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.303: D/dalvikvm(13494): GC_FOR_MALLOC freed 5 objects / 60176 bytes in 64ms 11-09 12:36:14.303: I/dalvikvm-heap(13494): Grow heap (frag case) to 11.366MB for 31574-byte allocation 11-09 12:36:14.316: W/dalvikvm(13494): HeapWorker may be wedged: 8790ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.354: D/dalvikvm(13494): GC_FOR_MALLOC freed 1 objects / 12064 bytes in 50ms 11-09 12:36:14.367: W/dalvikvm(13494): HeapWorker may be wedged: 8842ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.405: D/dalvikvm(13494): GC_FOR_MALLOC freed 20 objects / 184552 bytes in 50ms 11-09 12:36:14.416: W/dalvikvm(13494): HeapWorker may be wedged: 8894ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.459: D/dalvikvm(13494): GC_FOR_MALLOC freed 42 objects / 292160 bytes in 50ms 11-09 12:36:14.467: W/dalvikvm(13494): HeapWorker may be wedged: 8945ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.510: D/dalvikvm(13494): GC_FOR_MALLOC freed 25 objects / 204608 bytes in 50ms 11-09 12:36:14.522: W/dalvikvm(13494): HeapWorker may be wedged: 8997ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.561: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 271608 bytes in 50ms 11-09 12:36:14.574: W/dalvikvm(13494): HeapWorker may be wedged: 9048ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.612: D/dalvikvm(13494): GC_FOR_MALLOC freed 15 objects / 134960 bytes in 50ms 11-09 12:36:14.623: W/dalvikvm(13494): HeapWorker may be wedged: 9100ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.663: D/dalvikvm(13494): GC_FOR_MALLOC freed 41 objects / 283664 bytes in 49ms 11-09 12:36:14.674: W/dalvikvm(13494): HeapWorker may be wedged: 9152ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.717: D/dalvikvm(13494): GC_FOR_MALLOC freed 188 objects / 488456 bytes in 50ms 11-09 12:36:14.725: W/dalvikvm(13494): HeapWorker may be wedged: 9203ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.768: D/dalvikvm(13494): GC_FOR_MALLOC freed 30 objects / 241016 bytes in 49ms 11-09 12:36:14.776: W/dalvikvm(13494): HeapWorker may be wedged: 9254ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.819: D/dalvikvm(13494): GC_FOR_MALLOC freed 30 objects / 218840 bytes in 50ms 11-09 12:36:14.831: W/dalvikvm(13494): HeapWorker may be wedged: 9306ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.870: D/dalvikvm(13494): GC_FOR_MALLOC freed 45 objects / 271944 bytes in 50ms 11-09 12:36:14.883: W/dalvikvm(13494): HeapWorker may be wedged: 9358ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.920: D/dalvikvm(13494): GC_FOR_MALLOC freed 36 objects / 258112 bytes in 50ms 11-09 12:36:14.932: W/dalvikvm(13494): HeapWorker may be wedged: 9410ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.975: D/dalvikvm(13494): GC_FOR_MALLOC freed 65 objects / 347416 bytes in 50ms 11-09 12:36:14.989: W/dalvikvm(13494): HeapWorker may be wedged: 9463ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.030: D/dalvikvm(13494): GC_FOR_MALLOC freed 252 objects / 612008 bytes in 52ms 11-09 12:36:15.038: W/dalvikvm(13494): HeapWorker may be wedged: 9516ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.081: D/dalvikvm(13494): GC_FOR_MALLOC freed 1 objects / 8504 bytes in 50ms 11-09 12:36:15.093: W/dalvikvm(13494): HeapWorker may be wedged: 9567ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.131: D/dalvikvm(13494): GC_FOR_MALLOC freed 18 objects / 134304 bytes in 50ms 11-09 12:36:15.143: W/dalvikvm(13494): HeapWorker may be wedged: 9620ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.182: D/dalvikvm(13494): GC_FOR_MALLOC freed 252 objects / 609376 bytes in 50ms 11-09 12:36:15.194: W/dalvikvm(13494): HeapWorker may be wedged: 9671ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.237: D/dalvikvm(13494): GC_FOR_MALLOC freed 50 objects / 331608 bytes in 50ms 11-09 12:36:15.250: W/dalvikvm(13494): HeapWorker may be wedged: 9724ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.288: D/dalvikvm(13494): GC_FOR_MALLOC freed 262 objects / 656440 bytes in 50ms 11-09 12:36:15.299: W/dalvikvm(13494): HeapWorker may be wedged: 9775ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.338: D/dalvikvm(13494): GC_FOR_MALLOC freed 11 objects / 113064 bytes in 50ms 11-09 12:36:15.350: W/dalvikvm(13494): HeapWorker may be wedged: 9828ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.393: D/dalvikvm(13494): GC_FOR_MALLOC freed 65 objects / 330376 bytes in 50ms 11-09 12:36:15.401: W/dalvikvm(13494): HeapWorker may be wedged: 9879ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.444: D/dalvikvm(13494): GC_FOR_MALLOC freed 13 objects / 126880 bytes in 50ms 11-09 12:36:15.456: W/dalvikvm(13494): HeapWorker may be wedged: 9930ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.495: D/dalvikvm(13494): GC_FOR_MALLOC freed 13 objects / 134640 bytes in 50ms 11-09 12:36:15.508: W/dalvikvm(13494): HeapWorker may be wedged: 9982ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.545: D/dalvikvm(13494): GC_FOR_MALLOC freed 70 objects / 383152 bytes in 50ms 11-09 12:36:15.557: E/dalvikvm(13494): HeapWorker is wedged: 10035ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 557: I/dalvikvm(13494): DALVIK THREADS: 11-09 12:36:15.557: I/dalvikvm(13494): "main" prio=5 tid=1 VMWAIT 11-09 12:36:15.557: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x4001d8b0 self=0xcd28 11-09 12:36:15.557: I/dalvikvm(13494): | sysTid=13494 nice=0 sched=0/0 cgrp=default handle=-1345017808 11-09 12:36:15.557: I/dalvikvm(13494): at android.app.ContextImpl.makeFilename(ContextImpl.java:~1711) 11-09 12:36:15.557: I/dalvikvm(13494): at android.app.ContextImpl.validateFilePath(ContextImpl.java:1697) 11-09 12:36:15.561: I/dalvikvm(13494): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:599) 11-09 12:36:15.561: I/dalvikvm(13494): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203) 11-09 12:36:15.561: I/dalvikvm(13494): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98) 11-09 12:36:15.561: I/dalvikvm(13494): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158) 11-09 12:36:15.561: I/dalvikvm(13494): at org.sipdroid.sipua.ui.ListContacts.getFavorites(ListContacts.java:624) 11-09 12:36:15.561: I/dalvikvm(13494): at org.sipdroid.sipua.ui.ImageCursorAdapter.getView(ImageCursorAdapter.java:188) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.AbsListView.obtainView(AbsListView.java:1427) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.ListView.makeAndAddView(ListView.java:1813) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.ListView.fillSpecific(ListView.java:1358) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.ListView.layoutChildren(ListView.java:1656) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.AbsListView.onLayout(AbsListView.java:1259) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.ViewRoot.performTraversals(ViewRoot.java:1054) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.ViewRoot.handleMessage(ViewRoot.java:1749) 11-09 12:36:15.561: I/dalvikvm(13494): at android.os.Handler.dispatchMessage(Handler.java:99) 11-09 12:36:15.561: I/dalvikvm(13494): at android.os.Looper.loop(Looper.java:123) 11-09 12:36:15.561: I/dalvikvm(13494): at android.app.ActivityThread.main(ActivityThread.java:4627) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.reflect.Method.invokeNative(Native Method) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.reflect.Method.invoke(Method.java:521) 11-09 12:36:15.561: I/dalvikvm(13494): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 11-09 12:36:15.561: I/dalvikvm(13494): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) 11-09 12:36:15.561: I/dalvikvm(13494): at dalvik.system.NativeStart.main(Native Method) 11-09 12:36:15.561: I/dalvikvm(13494): "Thread-666" prio=5 tid=27 VMWAIT 11-09 12:36:15.561: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x48374bd0 self=0x5137d0 11-09 12:36:15.561: I/dalvikvm(13494): | sysTid=14193 nice=0 sched=0/0 cgrp=default handle=5957496 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.sip.provider.SipProvider.sendMessage(SipProvider.java:~879) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.sip.transaction.TransactionClient.onTimeout(TransactionClient.java:156) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.tools.Timer.onInnerTimeout(Timer.java:127) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.tools.InnerTimer.run(InnerTimer.java:41) 11-09 12:36:15.561: I/dalvikvm(13494): "Thread-661" prio=5 tid=519 TIMED_WAIT 11-09 12:36:15.561: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x4846db38 self=0x3ff7e8 11-09 12:36:15.561: I/dalvikvm(13494): | sysTid=14188 nice=0 sched=0/0 cgrp=default handle=7716296 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.VMThread.sleep(Native Method) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.Thread.sleep(Thread.java:1306) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.Thread.sleep(Thread.java:1286) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.tools.InnerTimer.run(InnerTimer.java:40) 11-09 12:36:15.561: I/dalvikvm(13494): "Thread-658" prio=5 tid=48 TIMED_WAIT 11-09 12:36:15.561: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x483e4b58 self=0x4f57b0 11-09 12:36:15.561: I/dalvikvm(13494): | sysTid=14185 nice=0 sched=0/0 cgrp=default handle=4064872
android
voip
sip
null
null
11/09/2011 12:44:15
not a real question
SIpdroid app moves to background === I initiated call from Sipdroid 5-6 times repeatedly. but the application hangs for sometime and moves to background. **Please Help** **Logcat Says:** 11-09 12:36:07.311: D/dalvikvm(13494): GC_FOR_MALLOC freed 5 objects / 55880 bytes in 53ms 11-09 12:36:07.366: D/dalvikvm(13494): GC_FOR_MALLOC freed 109 objects / 464328 bytes in 50ms 11-09 12:36:07.416: D/dalvikvm(13494): GC_FOR_MALLOC freed 19 objects / 179672 bytes in 50ms 11-09 12:36:07.467: D/dalvikvm(13494): GC_FOR_MALLOC freed 257 objects / 625464 bytes in 50ms 11-09 12:36:07.522: D/dalvikvm(13494): GC_FOR_MALLOC freed 90 objects / 347384 bytes in 50ms 11-09 12:36:07.573: D/dalvikvm(13494): GC_FOR_MALLOC freed 85 objects / 382752 bytes in 49ms 11-09 12:36:07.620: D/dalvikvm(13494): GC_FOR_MALLOC freed 1 objects / 8240 bytes in 49ms 11-09 12:36:07.623: I/dalvikvm-heap(13494): Grow heap (frag case) to 11.079MB for 28450-byte allocation 11-09 12:36:07.670: D/dalvikvm(13494): GC_FOR_MALLOC freed 4 objects / 18960 bytes in 49ms 11-09 12:36:07.725: D/dalvikvm(13494): GC_FOR_MALLOC freed 40 objects / 347144 bytes in 49ms 11-09 12:36:10.534: D/dalvikvm(13494): GC_FOR_MALLOC freed 136 objects / 325296 bytes in 50ms 11-09 12:36:10.546: W/dalvikvm(13494): HeapWorker may be wedged: 5021ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.584: D/dalvikvm(13494): GC_FOR_MALLOC freed 36 objects / 195136 bytes in 49ms 11-09 12:36:10.597: W/dalvikvm(13494): HeapWorker may be wedged: 5072ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.635: D/dalvikvm(13494): GC_FOR_MALLOC freed 41 objects / 237328 bytes in 50ms 11-09 12:36:10.647: W/dalvikvm(13494): HeapWorker may be wedged: 5123ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.686: D/dalvikvm(13494): GC_FOR_MALLOC freed 35 objects / 224792 bytes in 50ms 11-09 12:36:10.702: W/dalvikvm(13494): HeapWorker may be wedged: 5177ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.741: D/dalvikvm(13494): GC_FOR_MALLOC freed 255 objects / 621728 bytes in 51ms 11-09 12:36:10.754: W/dalvikvm(13494): HeapWorker may be wedged: 5228ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.791: D/dalvikvm(13494): GC_FOR_MALLOC freed 4 objects / 31832 bytes in 50ms 11-09 12:36:10.791: I/dalvikvm-heap(13494): Grow heap (frag case) to 11.224MB for 19274-byte allocation 11-09 12:36:10.803: W/dalvikvm(13494): HeapWorker may be wedged: 5279ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:10.842: D/dalvikvm(13494): GC_FOR_MALLOC freed 0 objects / 0 bytes in 51ms 11-09 12:36:12.269: W/dalvikvm(13494): HeapWorker may be wedged: 6743ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.311: D/dalvikvm(13494): GC_FOR_MALLOC freed 251 objects / 594632 bytes in 53ms 11-09 12:36:12.323: W/dalvikvm(13494): HeapWorker may be wedged: 6798ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.362: D/dalvikvm(13494): GC_FOR_MALLOC freed 16 objects / 142608 bytes in 50ms 11-09 12:36:12.375: W/dalvikvm(13494): HeapWorker may be wedged: 6849ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.412: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 256888 bytes in 50ms 11-09 12:36:12.424: W/dalvikvm(13494): HeapWorker may be wedged: 6901ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.467: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 263624 bytes in 50ms 11-09 12:36:12.475: W/dalvikvm(13494): HeapWorker may be wedged: 6952ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.518: D/dalvikvm(13494): GC_FOR_MALLOC freed 16 objects / 145840 bytes in 50ms 11-09 12:36:12.526: W/dalvikvm(13494): HeapWorker may be wedged: 7003ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.565: D/dalvikvm(13494): GC_FOR_MALLOC freed 6 objects / 65832 bytes in 49ms 11-09 12:36:12.577: W/dalvikvm(13494): HeapWorker may be wedged: 7054ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.620: D/dalvikvm(13494): GC_FOR_MALLOC freed 57 objects / 377928 bytes in 50ms 11-09 12:36:12.627: W/dalvikvm(13494): HeapWorker may be wedged: 7105ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.670: D/dalvikvm(13494): GC_FOR_MALLOC freed 23 objects / 219096 bytes in 50ms 11-09 12:36:12.684: W/dalvikvm(13494): HeapWorker may be wedged: 7159ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.721: D/dalvikvm(13494): GC_FOR_MALLOC freed 265 objects / 667288 bytes in 50ms 11-09 12:36:12.733: W/dalvikvm(13494): HeapWorker may be wedged: 7211ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.776: D/dalvikvm(13494): GC_FOR_MALLOC freed 80 objects / 392208 bytes in 50ms 11-09 12:36:12.789: W/dalvikvm(13494): HeapWorker may be wedged: 7263ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.827: D/dalvikvm(13494): GC_FOR_MALLOC freed 65 objects / 387080 bytes in 50ms 11-09 12:36:12.840: W/dalvikvm(13494): HeapWorker may be wedged: 7314ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.877: D/dalvikvm(13494): GC_FOR_MALLOC freed 10 objects / 125504 bytes in 50ms 11-09 12:36:12.889: W/dalvikvm(13494): HeapWorker may be wedged: 7367ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.932: D/dalvikvm(13494): GC_FOR_MALLOC freed 92 objects / 417960 bytes in 51ms 11-09 12:36:12.945: W/dalvikvm(13494): HeapWorker may be wedged: 7420ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:12.983: D/dalvikvm(13494): GC_FOR_MALLOC freed 76 objects / 390168 bytes in 50ms 11-09 12:36:12.995: W/dalvikvm(13494): HeapWorker may be wedged: 7472ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.038: D/dalvikvm(13494): GC_FOR_MALLOC freed 35 objects / 269872 bytes in 51ms 11-09 12:36:13.050: W/dalvikvm(13494): HeapWorker may be wedged: 7524ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.088: D/dalvikvm(13494): GC_FOR_MALLOC freed 10 objects / 111296 bytes in 51ms 11-09 12:36:13.100: W/dalvikvm(13494): HeapWorker may be wedged: 7575ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.139: D/dalvikvm(13494): GC_FOR_MALLOC freed 21 objects / 183832 bytes in 50ms 11-09 12:36:13.151: W/dalvikvm(13494): HeapWorker may be wedged: 7626ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.190: D/dalvikvm(13494): GC_FOR_MALLOC freed 24 objects / 212448 bytes in 49ms 11-09 12:36:13.204: W/dalvikvm(13494): HeapWorker may be wedged: 7678ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.241: D/dalvikvm(13494): GC_FOR_MALLOC freed 264 objects / 674096 bytes in 50ms 11-09 12:36:13.252: W/dalvikvm(13494): HeapWorker may be wedged: 7730ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.295: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 317672 bytes in 53ms 11-09 12:36:13.307: W/dalvikvm(13494): HeapWorker may be wedged: 7785ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.350: D/dalvikvm(13494): GC_FOR_MALLOC freed 19 objects / 216696 bytes in 50ms 11-09 12:36:13.362: W/dalvikvm(13494): HeapWorker may be wedged: 7837ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.401: D/dalvikvm(13494): GC_FOR_MALLOC freed 61 objects / 375176 bytes in 50ms 11-09 12:36:13.413: W/dalvikvm(13494): HeapWorker may be wedged: 7888ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.452: D/dalvikvm(13494): GC_FOR_MALLOC freed 14 objects / 165416 bytes in 50ms 11-09 12:36:13.467: W/dalvikvm(13494): HeapWorker may be wedged: 7941ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.506: D/dalvikvm(13494): GC_FOR_MALLOC freed 248 objects / 680472 bytes in 50ms 11-09 12:36:13.514: W/dalvikvm(13494): HeapWorker may be wedged: 7992ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.557: D/dalvikvm(13494): GC_FOR_MALLOC freed 21 objects / 206032 bytes in 50ms 11-09 12:36:13.565: W/dalvikvm(13494): HeapWorker may be wedged: 8043ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.608: D/dalvikvm(13494): GC_FOR_MALLOC freed 14 objects / 138704 bytes in 50ms 11-09 12:36:13.622: W/dalvikvm(13494): HeapWorker may be wedged: 8096ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.663: D/dalvikvm(13494): GC_FOR_MALLOC freed 263 objects / 665216 bytes in 51ms 11-09 12:36:13.670: W/dalvikvm(13494): HeapWorker may be wedged: 8149ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.713: D/dalvikvm(13494): GC_FOR_MALLOC freed 51 objects / 353464 bytes in 50ms 11-09 12:36:13.726: W/dalvikvm(13494): HeapWorker may be wedged: 8200ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.764: D/dalvikvm(13494): GC_FOR_MALLOC freed 23 objects / 206880 bytes in 50ms 11-09 12:36:13.779: W/dalvikvm(13494): HeapWorker may be wedged: 8254ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.819: D/dalvikvm(13494): GC_FOR_MALLOC freed 216 objects / 635192 bytes in 51ms 11-09 12:36:13.831: W/dalvikvm(13494): HeapWorker may be wedged: 8306ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.870: D/dalvikvm(13494): GC_FOR_MALLOC freed 55 objects / 349400 bytes in 50ms 11-09 12:36:13.882: W/dalvikvm(13494): HeapWorker may be wedged: 8357ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.920: D/dalvikvm(13494): GC_FOR_MALLOC freed 5 objects / 54504 bytes in 50ms 11-09 12:36:13.932: W/dalvikvm(13494): HeapWorker may be wedged: 8408ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:13.971: D/dalvikvm(13494): GC_FOR_MALLOC freed 29 objects / 235160 bytes in 50ms 11-09 12:36:13.983: W/dalvikvm(13494): HeapWorker may be wedged: 8460ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.030: D/dalvikvm(13494): GC_FOR_MALLOC freed 51 objects / 337648 bytes in 57ms 11-09 12:36:14.043: W/dalvikvm(13494): HeapWorker may be wedged: 8518ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.080: D/dalvikvm(13494): GC_FOR_MALLOC freed 57 objects / 328160 bytes in 50ms 11-09 12:36:14.092: W/dalvikvm(13494): HeapWorker may be wedged: 8570ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.131: D/dalvikvm(13494): GC_FOR_MALLOC freed 80 objects / 377536 bytes in 50ms 11-09 12:36:14.143: W/dalvikvm(13494): HeapWorker may be wedged: 8621ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.186: D/dalvikvm(13494): GC_FOR_MALLOC freed 69 objects / 336952 bytes in 50ms 11-09 12:36:14.198: W/dalvikvm(13494): HeapWorker may be wedged: 8672ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.241: D/dalvikvm(13494): GC_FOR_MALLOC freed 16 objects / 130760 bytes in 52ms 11-09 12:36:14.248: W/dalvikvm(13494): HeapWorker may be wedged: 8726ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.303: D/dalvikvm(13494): GC_FOR_MALLOC freed 5 objects / 60176 bytes in 64ms 11-09 12:36:14.303: I/dalvikvm-heap(13494): Grow heap (frag case) to 11.366MB for 31574-byte allocation 11-09 12:36:14.316: W/dalvikvm(13494): HeapWorker may be wedged: 8790ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.354: D/dalvikvm(13494): GC_FOR_MALLOC freed 1 objects / 12064 bytes in 50ms 11-09 12:36:14.367: W/dalvikvm(13494): HeapWorker may be wedged: 8842ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.405: D/dalvikvm(13494): GC_FOR_MALLOC freed 20 objects / 184552 bytes in 50ms 11-09 12:36:14.416: W/dalvikvm(13494): HeapWorker may be wedged: 8894ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.459: D/dalvikvm(13494): GC_FOR_MALLOC freed 42 objects / 292160 bytes in 50ms 11-09 12:36:14.467: W/dalvikvm(13494): HeapWorker may be wedged: 8945ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.510: D/dalvikvm(13494): GC_FOR_MALLOC freed 25 objects / 204608 bytes in 50ms 11-09 12:36:14.522: W/dalvikvm(13494): HeapWorker may be wedged: 8997ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.561: D/dalvikvm(13494): GC_FOR_MALLOC freed 39 objects / 271608 bytes in 50ms 11-09 12:36:14.574: W/dalvikvm(13494): HeapWorker may be wedged: 9048ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.612: D/dalvikvm(13494): GC_FOR_MALLOC freed 15 objects / 134960 bytes in 50ms 11-09 12:36:14.623: W/dalvikvm(13494): HeapWorker may be wedged: 9100ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.663: D/dalvikvm(13494): GC_FOR_MALLOC freed 41 objects / 283664 bytes in 49ms 11-09 12:36:14.674: W/dalvikvm(13494): HeapWorker may be wedged: 9152ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.717: D/dalvikvm(13494): GC_FOR_MALLOC freed 188 objects / 488456 bytes in 50ms 11-09 12:36:14.725: W/dalvikvm(13494): HeapWorker may be wedged: 9203ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.768: D/dalvikvm(13494): GC_FOR_MALLOC freed 30 objects / 241016 bytes in 49ms 11-09 12:36:14.776: W/dalvikvm(13494): HeapWorker may be wedged: 9254ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.819: D/dalvikvm(13494): GC_FOR_MALLOC freed 30 objects / 218840 bytes in 50ms 11-09 12:36:14.831: W/dalvikvm(13494): HeapWorker may be wedged: 9306ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.870: D/dalvikvm(13494): GC_FOR_MALLOC freed 45 objects / 271944 bytes in 50ms 11-09 12:36:14.883: W/dalvikvm(13494): HeapWorker may be wedged: 9358ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.920: D/dalvikvm(13494): GC_FOR_MALLOC freed 36 objects / 258112 bytes in 50ms 11-09 12:36:14.932: W/dalvikvm(13494): HeapWorker may be wedged: 9410ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:14.975: D/dalvikvm(13494): GC_FOR_MALLOC freed 65 objects / 347416 bytes in 50ms 11-09 12:36:14.989: W/dalvikvm(13494): HeapWorker may be wedged: 9463ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.030: D/dalvikvm(13494): GC_FOR_MALLOC freed 252 objects / 612008 bytes in 52ms 11-09 12:36:15.038: W/dalvikvm(13494): HeapWorker may be wedged: 9516ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.081: D/dalvikvm(13494): GC_FOR_MALLOC freed 1 objects / 8504 bytes in 50ms 11-09 12:36:15.093: W/dalvikvm(13494): HeapWorker may be wedged: 9567ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.131: D/dalvikvm(13494): GC_FOR_MALLOC freed 18 objects / 134304 bytes in 50ms 11-09 12:36:15.143: W/dalvikvm(13494): HeapWorker may be wedged: 9620ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.182: D/dalvikvm(13494): GC_FOR_MALLOC freed 252 objects / 609376 bytes in 50ms 11-09 12:36:15.194: W/dalvikvm(13494): HeapWorker may be wedged: 9671ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.237: D/dalvikvm(13494): GC_FOR_MALLOC freed 50 objects / 331608 bytes in 50ms 11-09 12:36:15.250: W/dalvikvm(13494): HeapWorker may be wedged: 9724ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.288: D/dalvikvm(13494): GC_FOR_MALLOC freed 262 objects / 656440 bytes in 50ms 11-09 12:36:15.299: W/dalvikvm(13494): HeapWorker may be wedged: 9775ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.338: D/dalvikvm(13494): GC_FOR_MALLOC freed 11 objects / 113064 bytes in 50ms 11-09 12:36:15.350: W/dalvikvm(13494): HeapWorker may be wedged: 9828ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.393: D/dalvikvm(13494): GC_FOR_MALLOC freed 65 objects / 330376 bytes in 50ms 11-09 12:36:15.401: W/dalvikvm(13494): HeapWorker may be wedged: 9879ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.444: D/dalvikvm(13494): GC_FOR_MALLOC freed 13 objects / 126880 bytes in 50ms 11-09 12:36:15.456: W/dalvikvm(13494): HeapWorker may be wedged: 9930ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.495: D/dalvikvm(13494): GC_FOR_MALLOC freed 13 objects / 134640 bytes in 50ms 11-09 12:36:15.508: W/dalvikvm(13494): HeapWorker may be wedged: 9982ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 11-09 12:36:15.545: D/dalvikvm(13494): GC_FOR_MALLOC freed 70 objects / 383152 bytes in 50ms 11-09 12:36:15.557: E/dalvikvm(13494): HeapWorker is wedged: 10035ms spent inside Lcom/android/internal/os/BinderInternal$GcWatcher;.finalize()V 557: I/dalvikvm(13494): DALVIK THREADS: 11-09 12:36:15.557: I/dalvikvm(13494): "main" prio=5 tid=1 VMWAIT 11-09 12:36:15.557: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x4001d8b0 self=0xcd28 11-09 12:36:15.557: I/dalvikvm(13494): | sysTid=13494 nice=0 sched=0/0 cgrp=default handle=-1345017808 11-09 12:36:15.557: I/dalvikvm(13494): at android.app.ContextImpl.makeFilename(ContextImpl.java:~1711) 11-09 12:36:15.557: I/dalvikvm(13494): at android.app.ContextImpl.validateFilePath(ContextImpl.java:1697) 11-09 12:36:15.561: I/dalvikvm(13494): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:599) 11-09 12:36:15.561: I/dalvikvm(13494): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:203) 11-09 12:36:15.561: I/dalvikvm(13494): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98) 11-09 12:36:15.561: I/dalvikvm(13494): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:158) 11-09 12:36:15.561: I/dalvikvm(13494): at org.sipdroid.sipua.ui.ListContacts.getFavorites(ListContacts.java:624) 11-09 12:36:15.561: I/dalvikvm(13494): at org.sipdroid.sipua.ui.ImageCursorAdapter.getView(ImageCursorAdapter.java:188) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.AbsListView.obtainView(AbsListView.java:1427) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.ListView.makeAndAddView(ListView.java:1813) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.ListView.fillSpecific(ListView.java:1358) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.ListView.layoutChildren(ListView.java:1656) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.AbsListView.onLayout(AbsListView.java:1259) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.LinearLayout.onLayout(LinearLayout.java:1042) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.widget.FrameLayout.onLayout(FrameLayout.java:333) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.View.layout(View.java:7035) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.ViewRoot.performTraversals(ViewRoot.java:1054) 11-09 12:36:15.561: I/dalvikvm(13494): at android.view.ViewRoot.handleMessage(ViewRoot.java:1749) 11-09 12:36:15.561: I/dalvikvm(13494): at android.os.Handler.dispatchMessage(Handler.java:99) 11-09 12:36:15.561: I/dalvikvm(13494): at android.os.Looper.loop(Looper.java:123) 11-09 12:36:15.561: I/dalvikvm(13494): at android.app.ActivityThread.main(ActivityThread.java:4627) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.reflect.Method.invokeNative(Native Method) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.reflect.Method.invoke(Method.java:521) 11-09 12:36:15.561: I/dalvikvm(13494): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871) 11-09 12:36:15.561: I/dalvikvm(13494): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629) 11-09 12:36:15.561: I/dalvikvm(13494): at dalvik.system.NativeStart.main(Native Method) 11-09 12:36:15.561: I/dalvikvm(13494): "Thread-666" prio=5 tid=27 VMWAIT 11-09 12:36:15.561: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x48374bd0 self=0x5137d0 11-09 12:36:15.561: I/dalvikvm(13494): | sysTid=14193 nice=0 sched=0/0 cgrp=default handle=5957496 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.sip.provider.SipProvider.sendMessage(SipProvider.java:~879) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.sip.transaction.TransactionClient.onTimeout(TransactionClient.java:156) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.tools.Timer.onInnerTimeout(Timer.java:127) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.tools.InnerTimer.run(InnerTimer.java:41) 11-09 12:36:15.561: I/dalvikvm(13494): "Thread-661" prio=5 tid=519 TIMED_WAIT 11-09 12:36:15.561: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x4846db38 self=0x3ff7e8 11-09 12:36:15.561: I/dalvikvm(13494): | sysTid=14188 nice=0 sched=0/0 cgrp=default handle=7716296 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.VMThread.sleep(Native Method) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.Thread.sleep(Thread.java:1306) 11-09 12:36:15.561: I/dalvikvm(13494): at java.lang.Thread.sleep(Thread.java:1286) 11-09 12:36:15.561: I/dalvikvm(13494): at org.zoolu.tools.InnerTimer.run(InnerTimer.java:40) 11-09 12:36:15.561: I/dalvikvm(13494): "Thread-658" prio=5 tid=48 TIMED_WAIT 11-09 12:36:15.561: I/dalvikvm(13494): | group="main" sCount=1 dsCount=0 s=N obj=0x483e4b58 self=0x4f57b0 11-09 12:36:15.561: I/dalvikvm(13494): | sysTid=14185 nice=0 sched=0/0 cgrp=default handle=4064872
1
3,474,019
08/13/2010 04:59:48
419,197
08/13/2010 04:59:48
1
0
Stopping a jQuery Content Slider while Flash content plays
Does anyone know a simple script that one could add to a custom jQuery content slider that would make the slider stop while Flash content is being played inside? Or, alternatively, just make the slider stop while hovering the mouse over it? All the best, Robert
jquery
flash
video
slider
stop
null
open
Stopping a jQuery Content Slider while Flash content plays === Does anyone know a simple script that one could add to a custom jQuery content slider that would make the slider stop while Flash content is being played inside? Or, alternatively, just make the slider stop while hovering the mouse over it? All the best, Robert
0
9,216,137
02/09/2012 17:54:44
916,450
08/28/2011 13:27:58
39
0
asp.net job interview questions
My friend just came back from ASP.NET job interview. He was asked to build a class for "File" and a class for "Folder". A folder can contain files and folders. Implement the following methods: AddFile(parent,size,name) AddFolder(parent,name) Delete() ShowFileSystem() The names are unique... He implemented an abstract base class which file and folder derived from. I think his mistake was that he implemented a dictionary inside each folder which contains objects from the abstract base class. Do you think the right way was to use a tree model with pointer to the parent object??? Thanks
c#
asp.net
oop
interview-questions
null
02/09/2012 17:58:36
too localized
asp.net job interview questions === My friend just came back from ASP.NET job interview. He was asked to build a class for "File" and a class for "Folder". A folder can contain files and folders. Implement the following methods: AddFile(parent,size,name) AddFolder(parent,name) Delete() ShowFileSystem() The names are unique... He implemented an abstract base class which file and folder derived from. I think his mistake was that he implemented a dictionary inside each folder which contains objects from the abstract base class. Do you think the right way was to use a tree model with pointer to the parent object??? Thanks
3
7,848,058
10/21/2011 10:21:36
1,421,542
03/09/2009 10:27:46
188
18
will paginate missing FROM-clause entry when paginating over association
I work with rails 2.3.5, will_paginate-2.3.15 and postgress. I have 2 belongs_to's to the same table. If i first search on a attribute and then on the aliased table attribute then it throws an exception. If I reverse the order in the conditions it works... class House belongs_to :owner, :class => "User" belogns_to :creator, :class => "User" end House.paginate( :page=>1, :include=>[:creator, :owner], :per_page=>20, :conditions=>"houses.city ILIKE E'%new yo%' and owners_houses.architect ILIKE E'%tom%'") raises ActiveRecord::StatementInvalid: PGError: ERROR: missing FROM-clause entry for table "owners_houses", in logs no joins in from clause This works: House.paginate( :page=>1, :include=>[:creator, :owner], :per_page=>20, :conditions=>"owners_houses.architect ILIKE E'%tom%' and houses.city ILIKE E'%new yo%'") Is this a bug in will_paginate? Why is this happening?
ruby-on-rails
will-paginate
null
null
null
null
open
will paginate missing FROM-clause entry when paginating over association === I work with rails 2.3.5, will_paginate-2.3.15 and postgress. I have 2 belongs_to's to the same table. If i first search on a attribute and then on the aliased table attribute then it throws an exception. If I reverse the order in the conditions it works... class House belongs_to :owner, :class => "User" belogns_to :creator, :class => "User" end House.paginate( :page=>1, :include=>[:creator, :owner], :per_page=>20, :conditions=>"houses.city ILIKE E'%new yo%' and owners_houses.architect ILIKE E'%tom%'") raises ActiveRecord::StatementInvalid: PGError: ERROR: missing FROM-clause entry for table "owners_houses", in logs no joins in from clause This works: House.paginate( :page=>1, :include=>[:creator, :owner], :per_page=>20, :conditions=>"owners_houses.architect ILIKE E'%tom%' and houses.city ILIKE E'%new yo%'") Is this a bug in will_paginate? Why is this happening?
0
11,514,219
07/16/2012 23:48:00
1,261,831
03/11/2012 03:58:29
25
0
Python string formatting issue
import random def main(): the_number = random.randint(1,100) guess = 0 no_of_tries = 0 while guess != the_number: no_of_tries += 1 guess = int(input("Enter your guess: ")) if guess < the_number: print "--------------------------------------" print "Guess higher!", "You guessed:", guess if guess == the_number - 1: print "You're so close!" if guess > the_number: print "--------------------------------------" print "Guess lower!", "You guessed:", guess if guess == the_number + 1: print "You're so close!" if guess == the_number: print "--------------------------------------" print "You guessed correctly! The number was:", the_number print "And it only took you", no_of_tries, "tries!" if __name__ == '__main__': main() Right now, in my random number guessing game, if a person guesses lower or higher by one number, they receive the following message: -------------------------------------- Guess lower! You guessed: 33 You're so close! But I want to make it one sentence. For example: -------------------------------------- Guess lower! You guessed: 33. You're so close! How would I implement this in my code? Thanks!
python
string
strip
null
null
null
open
Python string formatting issue === import random def main(): the_number = random.randint(1,100) guess = 0 no_of_tries = 0 while guess != the_number: no_of_tries += 1 guess = int(input("Enter your guess: ")) if guess < the_number: print "--------------------------------------" print "Guess higher!", "You guessed:", guess if guess == the_number - 1: print "You're so close!" if guess > the_number: print "--------------------------------------" print "Guess lower!", "You guessed:", guess if guess == the_number + 1: print "You're so close!" if guess == the_number: print "--------------------------------------" print "You guessed correctly! The number was:", the_number print "And it only took you", no_of_tries, "tries!" if __name__ == '__main__': main() Right now, in my random number guessing game, if a person guesses lower or higher by one number, they receive the following message: -------------------------------------- Guess lower! You guessed: 33 You're so close! But I want to make it one sentence. For example: -------------------------------------- Guess lower! You guessed: 33. You're so close! How would I implement this in my code? Thanks!
0
11,397,313
07/09/2012 14:38:26
1,511,656
07/09/2012 10:06:58
1
0
Can I license a HL mod under something else than GPL?
I'm lost in a jungle of licensing software, mods and plugins. Would be grateful if someone out there could answer the question I have. Let me explain. First we have the HL SDK where the EULA says - "Whereas, Licensee wishes to develop a modified game running only on the Half-Life engine (a "Mod") for free distribution in object code form only to licensed end users of Half-Life; and". As of today there is [metamod][1] that sits between the HL SDK and its plugins, and we have [amxmodx][2] (shortened AMXX) that is a metamod plugin. Both are open source GPL-licensed. And what I know, plugins to a GPL-licensed program must also be licensed with GPL, or the same features. Correct me if I am wrong. The problems I encounter with AMXX are : - PAWN (The language creating AMXX plugins with) is very limited - Creating AMXX modules is way too complicated. Requires 3 SDKs and is bad documented - People are selling plugins, and GPL requires them to give away the source code aswell So first questions - 1: Is the "free distribution" stated in **Valve EULA** bypassed because AMXX plugins are not using HL SDK at build time? Or why is this legal? If I get some useful answers here I'm gonna start a new HL SDK mod or a metamod plugin (depending on the answers). So there are a few goal with this project : - A simple but yet powerful SDK - Have the people legally sell plugins without giving out the souce code And then I have some other questions - 2: Can I create a HL mod ***and/or*** metamod plugin using the X11/MIT (or maybe BSD) license? So the mod is "free distribution" but its plugins can be sold without the source code? [1]: http://metamod.org/ [2]: http://www.amxmodx.org/
licensing
gpl
null
null
null
07/10/2012 15:54:09
off topic
Can I license a HL mod under something else than GPL? === I'm lost in a jungle of licensing software, mods and plugins. Would be grateful if someone out there could answer the question I have. Let me explain. First we have the HL SDK where the EULA says - "Whereas, Licensee wishes to develop a modified game running only on the Half-Life engine (a "Mod") for free distribution in object code form only to licensed end users of Half-Life; and". As of today there is [metamod][1] that sits between the HL SDK and its plugins, and we have [amxmodx][2] (shortened AMXX) that is a metamod plugin. Both are open source GPL-licensed. And what I know, plugins to a GPL-licensed program must also be licensed with GPL, or the same features. Correct me if I am wrong. The problems I encounter with AMXX are : - PAWN (The language creating AMXX plugins with) is very limited - Creating AMXX modules is way too complicated. Requires 3 SDKs and is bad documented - People are selling plugins, and GPL requires them to give away the source code aswell So first questions - 1: Is the "free distribution" stated in **Valve EULA** bypassed because AMXX plugins are not using HL SDK at build time? Or why is this legal? If I get some useful answers here I'm gonna start a new HL SDK mod or a metamod plugin (depending on the answers). So there are a few goal with this project : - A simple but yet powerful SDK - Have the people legally sell plugins without giving out the souce code And then I have some other questions - 2: Can I create a HL mod ***and/or*** metamod plugin using the X11/MIT (or maybe BSD) license? So the mod is "free distribution" but its plugins can be sold without the source code? [1]: http://metamod.org/ [2]: http://www.amxmodx.org/
2
5,922,978
05/07/2011 18:01:00
339,500
05/12/2010 15:56:53
399
10
JS library for draggable box/div
i'm looking for a fancy JS library that permits me to create different draggable divs in the same page; i would like to find something newer, if possible, of jQueryUI dialogs. Do you know any examples? Thanks in advance c.
javascript
div
null
null
null
null
open
JS library for draggable box/div === i'm looking for a fancy JS library that permits me to create different draggable divs in the same page; i would like to find something newer, if possible, of jQueryUI dialogs. Do you know any examples? Thanks in advance c.
0
701,746
03/31/2009 16:02:44
21,209
09/23/2008 16:03:51
285
22
How to force Webbrowser component to always open web page in the same window?
I need to use webbroser in my application as it keeps repetitive tasks from employees, but there is aproblem with javascript that opens a new window in IE after clicking on anchor. How do I tell webbrowser component to "open new window" where I want it to be opened? For example in the other webbrowser component?
webbrowser
open
new
window
c#
null
open
How to force Webbrowser component to always open web page in the same window? === I need to use webbroser in my application as it keeps repetitive tasks from employees, but there is aproblem with javascript that opens a new window in IE after clicking on anchor. How do I tell webbrowser component to "open new window" where I want it to be opened? For example in the other webbrowser component?
0
10,576,711
05/14/2012 01:50:13
1,029,146
11/04/2011 06:05:40
323
4
How to communicate between windows?
EDIT: This question can be summed up as follows: How can two separate html pages, in separate windows, exchange information asynchronously? For a class project, I have to build a web-based chat client. The professor provided a working server. I have a portion of it up and running-- any connected users can send messages to the server, and it will be relayed to all connected users and appear in their main chat window, chatroom-style. However, the client is additionally required to have the option of sending/receiving private messages. If a private message is sent or received, a new window is opened, showing a chat interface for communication *only with that user.* Any future private messages sent/received by the client to/from that user will appear in this window instead of the main chatroom. I'm at a *complete* loss. Having received a private message, how can I open a new window and then *continue to communicate with that window*? If more private messages are received from that user through the main window's websocket connection, they must be sent to that window, and if messages are sent from that window to that other user, they must be relayed through the main window's websocket connection. How can this be done, if it can be done at all?
javascript
jquery
homework
websocket
null
null
open
How to communicate between windows? === EDIT: This question can be summed up as follows: How can two separate html pages, in separate windows, exchange information asynchronously? For a class project, I have to build a web-based chat client. The professor provided a working server. I have a portion of it up and running-- any connected users can send messages to the server, and it will be relayed to all connected users and appear in their main chat window, chatroom-style. However, the client is additionally required to have the option of sending/receiving private messages. If a private message is sent or received, a new window is opened, showing a chat interface for communication *only with that user.* Any future private messages sent/received by the client to/from that user will appear in this window instead of the main chatroom. I'm at a *complete* loss. Having received a private message, how can I open a new window and then *continue to communicate with that window*? If more private messages are received from that user through the main window's websocket connection, they must be sent to that window, and if messages are sent from that window to that other user, they must be relayed through the main window's websocket connection. How can this be done, if it can be done at all?
0
3,711,099
09/14/2010 16:54:02
447,588
09/14/2010 16:53:59
1
0
cost of developing and running a GPS application
i am currently undergoing the branding of a place that is in the outskirts of a major city. the situation at hand is that the place is unknown and not easy to get around, so my associates and i have planned to develop a gps application with specifics eg safari lodges, conference venues of this area and make it possible for people to download it onto their smartphones (nokia,iphone and black berry) and be able to navigate their way around. the issue is how much would it cost to develop such an application and run it? need an answer ASAP. thanks a mil.
iphone
null
null
null
null
09/15/2010 14:25:55
off topic
cost of developing and running a GPS application === i am currently undergoing the branding of a place that is in the outskirts of a major city. the situation at hand is that the place is unknown and not easy to get around, so my associates and i have planned to develop a gps application with specifics eg safari lodges, conference venues of this area and make it possible for people to download it onto their smartphones (nokia,iphone and black berry) and be able to navigate their way around. the issue is how much would it cost to develop such an application and run it? need an answer ASAP. thanks a mil.
2
4,803,699
01/26/2011 10:54:41
1,423,327
01/18/2011 08:46:25
11
0
Difference between linenumbers of cat file | nl and wc -l file
i have a file with e.g. 9818 lines. When i use wc -l file, i see 9818 lines. When i vi the file, i see 9818 lines. When i :set numbers, i see 9818 lines. But when i cat file | nl, i see the final line number is 9750 (e.g.). Basically i'm asking why line numbers from cat file | nl and wc -l file do not match.
unix
ksh
null
null
null
null
open
Difference between linenumbers of cat file | nl and wc -l file === i have a file with e.g. 9818 lines. When i use wc -l file, i see 9818 lines. When i vi the file, i see 9818 lines. When i :set numbers, i see 9818 lines. But when i cat file | nl, i see the final line number is 9750 (e.g.). Basically i'm asking why line numbers from cat file | nl and wc -l file do not match.
0
5,331,155
03/16/2011 20:06:58
16,295
09/17/2008 16:00:00
329
24
NHibernate.IFutureValue<> when serialized includes .Value
I'm building an ASP.NET (2.0, no, I can't change it) site with NHibernate, and have a custom JSON converter so I can not-serialize properties I want hidden from the client. This lets me just return the objects, and never have to worry about their serialized values - they're always secure. Unfortunately, it appears that if I use `query.FutureValue<class>()`, the object that gets serialized is first the `NHibernate.Impl.FutureValue<class>` and not my entity, which means I get JSON that looks like this if I throw it in a dictionary and return it to the client: {key: { Value: { /* my serialized object properties */ } } Previously I discovered that I can't get any interfaces to work in ASP's JavaScriptConverter implementations... only regular or abstract classes. So returning `typeof(IFutureValue<MyBaseClass>)` as a supported type means my converter is completely ignored. I can catch MyBaseClass, because I refactored things earlier to use an abstract base instead of an interface, but not the interface. And then I discover that the FutureValue implementation in .Impl is internal to the assembly, or some other such nonsense that only serves to make my .NET experience even more painful. So I can't use `typeof(FutureValue<MyBaseClass>)` to handle it all, because FutureValue exists only in my debugging sessions. Is there a way to get the class type out of the assembly? Or a way to convince ASP that interfaces do in fact have uses? Or might there be some superclass I *can* access that would let me get around the whole issue? Help! I like my Futures, it lets me batch a whole heck-ton of calls at once! (if something isn't clear, or you want more code, by all means, ask! I can post quite a bit.)
asp.net
nhibernate
serialization
jsonserializer
null
null
open
NHibernate.IFutureValue<> when serialized includes .Value === I'm building an ASP.NET (2.0, no, I can't change it) site with NHibernate, and have a custom JSON converter so I can not-serialize properties I want hidden from the client. This lets me just return the objects, and never have to worry about their serialized values - they're always secure. Unfortunately, it appears that if I use `query.FutureValue<class>()`, the object that gets serialized is first the `NHibernate.Impl.FutureValue<class>` and not my entity, which means I get JSON that looks like this if I throw it in a dictionary and return it to the client: {key: { Value: { /* my serialized object properties */ } } Previously I discovered that I can't get any interfaces to work in ASP's JavaScriptConverter implementations... only regular or abstract classes. So returning `typeof(IFutureValue<MyBaseClass>)` as a supported type means my converter is completely ignored. I can catch MyBaseClass, because I refactored things earlier to use an abstract base instead of an interface, but not the interface. And then I discover that the FutureValue implementation in .Impl is internal to the assembly, or some other such nonsense that only serves to make my .NET experience even more painful. So I can't use `typeof(FutureValue<MyBaseClass>)` to handle it all, because FutureValue exists only in my debugging sessions. Is there a way to get the class type out of the assembly? Or a way to convince ASP that interfaces do in fact have uses? Or might there be some superclass I *can* access that would let me get around the whole issue? Help! I like my Futures, it lets me batch a whole heck-ton of calls at once! (if something isn't clear, or you want more code, by all means, ask! I can post quite a bit.)
0
756,063
04/16/2009 13:17:15
13,627
09/16/2008 20:16:07
2,490
78
Do you have a physical "developer busy" indicator ?
At my workplace, it has been suggested that each developer is given the opportunity to indicate to his peers that he is busy and cannot be disturbed. This would be done in order to ensure that you don't get disturbed, when you are "in the zone". Do you think this is a good idea ? Do you have anything like that at your workplace ? I am also wondering how it would be best to indicate the "busy status". It should be something physical that can be seen by everyone in the office. This is for an open-room office; so closing a door cannot be used. What would _you_ suggest ?
work-environment
development-environment
interruptions
null
null
02/06/2012 19:17:29
not constructive
Do you have a physical "developer busy" indicator ? === At my workplace, it has been suggested that each developer is given the opportunity to indicate to his peers that he is busy and cannot be disturbed. This would be done in order to ensure that you don't get disturbed, when you are "in the zone". Do you think this is a good idea ? Do you have anything like that at your workplace ? I am also wondering how it would be best to indicate the "busy status". It should be something physical that can be seen by everyone in the office. This is for an open-room office; so closing a door cannot be used. What would _you_ suggest ?
4
6,307,797
06/10/2011 14:31:05
49,684
12/29/2008 00:39:20
387
6
database design critique
I've been given an ERD to review, I attached a png, this db models a product. I have my thoughts about it, I'm just looking for an unbiased objective view on it. ![Pathole][1] [1]: http://i.stack.imgur.com/IUO29.png
database-design
null
null
null
null
06/12/2011 04:28:25
off topic
database design critique === I've been given an ERD to review, I attached a png, this db models a product. I have my thoughts about it, I'm just looking for an unbiased objective view on it. ![Pathole][1] [1]: http://i.stack.imgur.com/IUO29.png
2
5,280,985
03/12/2011 06:22:29
243,323
01/04/2010 16:57:09
129
7
Flex and actionscript basics
I have experience in flex3 and action script programming for about 1 year. and my total experience is 4 yrs(3 yr in java). in that for 1 year i got chance to work with flex technology. Now i again want to take back as UI developer in flex technology. but i have very less knowledge on flex technology. I started applying for java and flex requirement posts. But i doubt, whether i can clear them are not. So can you guide me how i can go about it. What all things i need to study. to make my fundaments in flext technology good. 1 yr, i worked on standalone appliction with flex technoly.not java with flex. Its completely flex and actionscript. Since actionscript is also OOP, i leart Actionscript easily. But combination of flex and java, i dont know. Do i need to learn these and then apply for job. Please guide me to decide.
java
flex
homework
actionscript
flex3
03/13/2011 17:23:17
not a real question
Flex and actionscript basics === I have experience in flex3 and action script programming for about 1 year. and my total experience is 4 yrs(3 yr in java). in that for 1 year i got chance to work with flex technology. Now i again want to take back as UI developer in flex technology. but i have very less knowledge on flex technology. I started applying for java and flex requirement posts. But i doubt, whether i can clear them are not. So can you guide me how i can go about it. What all things i need to study. to make my fundaments in flext technology good. 1 yr, i worked on standalone appliction with flex technoly.not java with flex. Its completely flex and actionscript. Since actionscript is also OOP, i leart Actionscript easily. But combination of flex and java, i dont know. Do i need to learn these and then apply for job. Please guide me to decide.
1
6,731,145
07/18/2011 09:51:28
825,994
07/02/2011 11:15:10
1
0
how to upload compressd file in php
i have uploaded 3 files 1) Provisioning file 2) plist file 3) Ipa file Provisioning file & plist file are uploaded but Ipa file is not uploaded how to upload the above files
php
file-upload
null
null
null
07/18/2011 12:08:02
not a real question
how to upload compressd file in php === i have uploaded 3 files 1) Provisioning file 2) plist file 3) Ipa file Provisioning file & plist file are uploaded but Ipa file is not uploaded how to upload the above files
1
10,099,153
04/11/2012 02:44:42
1,028,435
11/03/2011 19:43:58
13
2
How to modify PATH variable for X11 during log-in?
Original question is here: http://stackoverflow.com/questions/10096327/overwriting-print-screen-actions-in-linux-without-administrative-rights. Decided to revise my question, based on what I learned there: Essentially, my problem is that I am working on some lab computers (read: no administrative rights) that, if I log in, I need to change the PATH variable as X11 starts. The reason is that I need to change the PATH variable at this time, as opposed to later, is that the Print Screen command seems to "bind" during login (forgive my bad explanation of this). You can see in the work-around I listed in the previous section, that I can make it work by starting a new X, but I was wondering if it is possible to change upon login. Any ideas?
linux
x11
redhat
null
null
04/11/2012 05:22:00
off topic
How to modify PATH variable for X11 during log-in? === Original question is here: http://stackoverflow.com/questions/10096327/overwriting-print-screen-actions-in-linux-without-administrative-rights. Decided to revise my question, based on what I learned there: Essentially, my problem is that I am working on some lab computers (read: no administrative rights) that, if I log in, I need to change the PATH variable as X11 starts. The reason is that I need to change the PATH variable at this time, as opposed to later, is that the Print Screen command seems to "bind" during login (forgive my bad explanation of this). You can see in the work-around I listed in the previous section, that I can make it work by starting a new X, but I was wondering if it is possible to change upon login. Any ideas?
2
259,091
11/03/2008 16:00:26
4,376
09/03/2008 09:30:40
639
38
How can I scrape an HTML table to CSV?
#The Problem I use a tool at work that lets me do queries and get back HTML tables of info. I do not have any kind of back-end access to it. A lot of this info would be much more useful if I could put it into a spreadsheet for sorting, averaging, etc. **How can I screen-scrape this data to a CSV file?** ##My First Idea Since I know jQuery, I thought I might use it to strip out the table formatting onscreen, insert commas and line breaks, and just copy the whole mess into notepad and save as a CSV. **Any better ideas?**
screen-scraping
null
null
null
null
null
open
How can I scrape an HTML table to CSV? === #The Problem I use a tool at work that lets me do queries and get back HTML tables of info. I do not have any kind of back-end access to it. A lot of this info would be much more useful if I could put it into a spreadsheet for sorting, averaging, etc. **How can I screen-scrape this data to a CSV file?** ##My First Idea Since I know jQuery, I thought I might use it to strip out the table formatting onscreen, insert commas and line breaks, and just copy the whole mess into notepad and save as a CSV. **Any better ideas?**
0
2,063,524
01/14/2010 10:46:55
126,999
06/22/2009 15:06:29
26
2
Visual Studio 2010 Compilation Error
I’ve been trialing the current version of Microsoft Visual Studio 2010 Beta and have come across a strange problem. When I try to compile any project, I get the error message “The operation could not be completed”, with no further information. This happens both with C#, C++ and VB.NET projects and regardless of whether the project is an existing solution or I’m creating a new one. Has anyone else experienced this and are there any solutions?
visualstudio2010
null
null
null
null
null
open
Visual Studio 2010 Compilation Error === I’ve been trialing the current version of Microsoft Visual Studio 2010 Beta and have come across a strange problem. When I try to compile any project, I get the error message “The operation could not be completed”, with no further information. This happens both with C#, C++ and VB.NET projects and regardless of whether the project is an existing solution or I’m creating a new one. Has anyone else experienced this and are there any solutions?
0
3,729,395
09/16/2010 18:01:32
310,291
03/02/2010 15:22:39
844
13
Will decimal be supported one day with Math.Pow in .NET ?
I saw this dated in 2004: http://connect.microsoft.com/VisualStudio/feedback/details/94548/math-pow-method-should-have-an-overload-for-decimal Math.Pow() method should have an overload for decimal Since has anything changed ? Cause I try it doesn't seem Pow supports decimal.
c#
null
null
null
null
09/16/2010 18:09:13
not constructive
Will decimal be supported one day with Math.Pow in .NET ? === I saw this dated in 2004: http://connect.microsoft.com/VisualStudio/feedback/details/94548/math-pow-method-should-have-an-overload-for-decimal Math.Pow() method should have an overload for decimal Since has anything changed ? Cause I try it doesn't seem Pow supports decimal.
4
7,280,275
09/02/2011 07:17:39
452,580
09/20/2010 10:02:55
233
1
Recursive array correct method of display
Sorry guys back again with my recursive array which does work but I cannot get the "layout" right what I am after is a "proper" tree structure using `<ul>`,`<li>` so you end up like this: <ul> <li>Item <ul> <li>Child <ul> <li>Child of child <ul> <li>Etc...</li> </ul> </li> </ul> </li> </ul> </li> </ul> My function looks like this - whilst the function works the "layout" does not suggestions please. function recursive_array($results,$tbl) { global $DBH; $tbl = $tbl; if (count($results)) { foreach($results as $res) { if( $res->ParentID == 0 ) { echo '<ul class="recursive">'; echo '<li>'; echo $res->Name; echo $res->Description; echo $res->date_added; echo '<ul>'; } if( $res->ParentID != 0 ) { echo '<li>'; echo $res->Name; echo $res->Description; echo $res->date_added; echo '</li>'; } $STH = $DBH->query("SELECT * FROM ".$tbl." WHERE ParentID = '".$res->ID."'"); $fquerycount = $STH->rowCount(); $STH->setFetchMode(PDO::FETCH_OBJ); recursive_array($STH,$tbl); if( $res->ParentID == 0 ) { echo '</ul></li></ul>'; } } } } Thanks in advance
arrays
layout
recursive-query
null
null
null
open
Recursive array correct method of display === Sorry guys back again with my recursive array which does work but I cannot get the "layout" right what I am after is a "proper" tree structure using `<ul>`,`<li>` so you end up like this: <ul> <li>Item <ul> <li>Child <ul> <li>Child of child <ul> <li>Etc...</li> </ul> </li> </ul> </li> </ul> </li> </ul> My function looks like this - whilst the function works the "layout" does not suggestions please. function recursive_array($results,$tbl) { global $DBH; $tbl = $tbl; if (count($results)) { foreach($results as $res) { if( $res->ParentID == 0 ) { echo '<ul class="recursive">'; echo '<li>'; echo $res->Name; echo $res->Description; echo $res->date_added; echo '<ul>'; } if( $res->ParentID != 0 ) { echo '<li>'; echo $res->Name; echo $res->Description; echo $res->date_added; echo '</li>'; } $STH = $DBH->query("SELECT * FROM ".$tbl." WHERE ParentID = '".$res->ID."'"); $fquerycount = $STH->rowCount(); $STH->setFetchMode(PDO::FETCH_OBJ); recursive_array($STH,$tbl); if( $res->ParentID == 0 ) { echo '</ul></li></ul>'; } } } } Thanks in advance
0
2,035,613
01/10/2010 00:52:13
65,387
02/12/2009 03:01:00
3,037
154
How to brush up on PHP?
I have an interview on Tuesday for a PHP job. I've been programming in PHP for about 6 years, but mostly ad-hoc self-built systems, it wasn't until about a year ago that I started to adopt frameworks and get more OOPy. These are familiar concepts from other languages though. What can I do to brush up and ace my interview?
interview-questions
php
null
null
null
12/06/2011 02:43:14
not constructive
How to brush up on PHP? === I have an interview on Tuesday for a PHP job. I've been programming in PHP for about 6 years, but mostly ad-hoc self-built systems, it wasn't until about a year ago that I started to adopt frameworks and get more OOPy. These are familiar concepts from other languages though. What can I do to brush up and ace my interview?
4
6,967,686
08/06/2011 15:07:57
802,370
06/16/2011 22:06:01
33
0
Stop resubmit on form
I have a simple form on my site that allows users to add comments on photos. However, the form doenst use ajax (like facebook). Instead, it submits the form and refreshes the page. This is fine however, if a user reloads the page, there is an alert that he/she will resubmit the data resulting in two of the same comments. Id like to remove this resubmit without sending the user to a confirmation page. Thanks. Here is my form: <form name='form' action='index.php' method='POST'> <input type='text' name='comment'> <input type='submit' value='submit' name='submit'>
forms
refresh
submit
null
null
null
open
Stop resubmit on form === I have a simple form on my site that allows users to add comments on photos. However, the form doenst use ajax (like facebook). Instead, it submits the form and refreshes the page. This is fine however, if a user reloads the page, there is an alert that he/she will resubmit the data resulting in two of the same comments. Id like to remove this resubmit without sending the user to a confirmation page. Thanks. Here is my form: <form name='form' action='index.php' method='POST'> <input type='text' name='comment'> <input type='submit' value='submit' name='submit'>
0
6,027,508
05/17/2011 07:17:22
314,661
04/12/2010 15:22:23
1,635
19
Basic maths for animation
Assuming I have a form and paint an oval on it. I then want to take a control (such as a picturebox) and (while keeping the top left corner of the control exactly on the line) I want to move the control pixel by pixel following the drawn oval. Basically I want to calculate the Top/Left point for each position/pixel in my oval. I know its a basic formula but cant for the life of me remember what its called or how its accomplished. Anyone care to help? ![Example][1] [1]: http://i.stack.imgur.com/khKw2.png
c#
.net
animation
graphics
geometry
null
open
Basic maths for animation === Assuming I have a form and paint an oval on it. I then want to take a control (such as a picturebox) and (while keeping the top left corner of the control exactly on the line) I want to move the control pixel by pixel following the drawn oval. Basically I want to calculate the Top/Left point for each position/pixel in my oval. I know its a basic formula but cant for the life of me remember what its called or how its accomplished. Anyone care to help? ![Example][1] [1]: http://i.stack.imgur.com/khKw2.png
0
10,703,576
05/22/2012 13:58:53
1,238,487
02/28/2012 17:51:15
47
4
Ordered Lists - Double Letters
This might be a simple question but it is eluding me right now. I have an ordered list and it is extending past the A-Z and is going into the double letters, which is fine. The double letters come out in this format: AA. AB. AC. and was wondering if there is a way to make them come out as: AA. BB. CC. Thanks in advance!
html
html-lists
null
null
null
null
open
Ordered Lists - Double Letters === This might be a simple question but it is eluding me right now. I have an ordered list and it is extending past the A-Z and is going into the double letters, which is fine. The double letters come out in this format: AA. AB. AC. and was wondering if there is a way to make them come out as: AA. BB. CC. Thanks in advance!
0
11,672,987
07/26/2012 15:40:51
1,541,869
07/20/2012 22:01:57
6
0
Add a number to an existing number in an existing column
How can I add a number (which is the file #) to an existing column in all tables in the database in SQL? I want to multiply the file # ( say 111111) by 100 (11111100) and then add the current value in the existing column (say 24) so the final value in the column will be 11111124. sorry if its too specific to ask
sql
sql-server
database
null
null
07/28/2012 10:58:43
not a real question
Add a number to an existing number in an existing column === How can I add a number (which is the file #) to an existing column in all tables in the database in SQL? I want to multiply the file # ( say 111111) by 100 (11111100) and then add the current value in the existing column (say 24) so the final value in the column will be 11111124. sorry if its too specific to ask
1
8,103,841
11/12/2011 10:21:24
1,043,006
11/12/2011 10:18:30
1
0
Quitting a While loop in C++ by entering a blank
I have a loop in C++ that am stuck with, I want to end the loop by entering a blank, if a character is entered then the loop goes on. using VS2010
visual-c++
null
null
null
null
11/12/2011 10:52:47
not a real question
Quitting a While loop in C++ by entering a blank === I have a loop in C++ that am stuck with, I want to end the loop by entering a blank, if a character is entered then the loop goes on. using VS2010
1
10,485,618
05/07/2012 16:26:23
1,340,362
05/24/2010 10:47:16
216
7
How to create dynamic html
My question is really wiered. I am working on a advertisement website. I was checking some other websites as following http://www.XXXXXXX.com/XXXXX/XXXXXX/YYYY-available-3+1-YYYY-YYYYY-road.html My Question is when I browse any ad in website,its opening a html file with title of Ad. if website has 10000 ads, I am sure they will not create 10000 html file. but while browsing the ads, we can see the URL like above. YYYY-available-3+1-YYYY-YYYYY-road.html basically it was a title of Ad. now how I can do this. I have implemented in jsp with dynamic values. but I want to implement as above. please help and suggest
html
html5
null
null
null
05/08/2012 12:51:45
not a real question
How to create dynamic html === My question is really wiered. I am working on a advertisement website. I was checking some other websites as following http://www.XXXXXXX.com/XXXXX/XXXXXX/YYYY-available-3+1-YYYY-YYYYY-road.html My Question is when I browse any ad in website,its opening a html file with title of Ad. if website has 10000 ads, I am sure they will not create 10000 html file. but while browsing the ads, we can see the URL like above. YYYY-available-3+1-YYYY-YYYYY-road.html basically it was a title of Ad. now how I can do this. I have implemented in jsp with dynamic values. but I want to implement as above. please help and suggest
1
11,256,107
06/29/2012 04:33:58
1,248,244
03/04/2012 15:21:44
15
2
Nivo Slider: Move thumbs inside caption?
I am using Nivo Slider 3.0.1 on a website for a hotel. I am using image thumbnails for my control nav, they appear underneath the slideshow and work perfectly. http://nivo.dev7studios.com/ I would love to somehow move the thumbnail control navigation so it is inside the captions that overlay my slideshow images and on the left of the text placed in there. Unfortunately, javascript isn't my forte, and I'm not sure how to accomplish this. Has anybody done this before? Here is the plugin code for quick reference: /* * jQuery Nivo Slider v3.0.1 * http://nivo.dev7studios.com * * Copyright 2012, Dev7studios * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function($) { var NivoSlider = function(element, options){ // Defaults are below var settings = $.extend({}, $.fn.nivoSlider.defaults, options); // Useful variables. Play carefully. var vars = { currentSlide: 0, currentImage: '', totalSlides: 0, running: false, paused: false, stop: false, controlNavEl: false }; // Get this slider var slider = $(element); slider.data('nivo:vars', vars).addClass('nivoSlider'); // Find our slider children var kids = slider.children(); kids.each(function() { var child = $(this); var link = ''; if(!child.is('img')){ if(child.is('a')){ child.addClass('nivo-imageLink'); link = child; } child = child.find('img:first'); } // Get img width & height var childWidth = (childWidth === 0) ? child.attr('width') : child.width(), childHeight = (childHeight === 0) ? child.attr('height') : child.height(); if(link !== ''){ link.css('display','none'); } child.css('display','none'); vars.totalSlides++; }); // If randomStart if(settings.randomStart){ settings.startSlide = Math.floor(Math.random() * vars.totalSlides); } // Set startSlide if(settings.startSlide > 0){ if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; } vars.currentSlide = settings.startSlide; } // Get initial image if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Show initial link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Set first background var sliderImg = $('<img class="nivo-main-image" src="#" />'); sliderImg.attr('src', vars.currentImage.attr('src')).show(); slider.append(sliderImg); // Detect Window Resize $(window).resize(function() { slider.children('img').width(slider.width()); sliderImg.attr('src', vars.currentImage.attr('src')); sliderImg.stop().height('auto'); $('.nivo-slice').remove(); $('.nivo-box').remove(); }); //Create caption slider.append($('<div class="nivo-caption"></div>')); // Process caption function var processCaption = function(settings){ var nivoCaption = $('.nivo-caption', slider); if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){ var title = vars.currentImage.attr('title'); if(title.substr(0,1) == '#') title = $(title).html(); if(nivoCaption.css('display') == 'block'){ setTimeout(function(){ nivoCaption.html(title); }, settings.animSpeed); } else { nivoCaption.html(title); nivoCaption.stop().fadeIn(settings.animSpeed); } } else { nivoCaption.stop().fadeOut(settings.animSpeed); } } //Process initial caption processCaption(settings); // In the words of Super Mario "let's a go!" var timer = 0; if(!settings.manualAdvance && kids.length > 1){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Add Direction nav if(settings.directionNav){ slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>'); // Hide Direction nav if(settings.directionNavHide){ $('.nivo-directionNav', slider).hide(); slider.hover(function(){ $('.nivo-directionNav', slider).show(); }, function(){ $('.nivo-directionNav', slider).hide(); }); } $('a.nivo-prevNav', slider).live('click', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; vars.currentSlide -= 2; nivoRun(slider, kids, settings, 'prev'); }); $('a.nivo-nextNav', slider).live('click', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; nivoRun(slider, kids, settings, 'next'); }); } // Add Control nav if(settings.controlNav){ vars.controlNavEl = $('<div class="nivo-controlNav"></div>'); slider.after(vars.controlNavEl); for(var i = 0; i < kids.length; i++){ if(settings.controlNavThumbs){ vars.controlNavEl.addClass('nivo-thumbs-enabled'); var child = kids.eq(i); if(!child.is('img')){ child = child.find('img:first'); } if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>'); } else { vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>'); } } //Set initial active link $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); $('a', vars.controlNavEl).bind('click', function(){ if(vars.running) return false; if($(this).hasClass('active')) return false; clearInterval(timer); timer = ''; sliderImg.attr('src', vars.currentImage.attr('src')); vars.currentSlide = $(this).attr('rel') - 1; nivoRun(slider, kids, settings, 'control'); }); } //For pauseOnHover setting if(settings.pauseOnHover){ slider.hover(function(){ vars.paused = true; clearInterval(timer); timer = ''; }, function(){ vars.paused = false; // Restart the timer if(timer === '' && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } }); } // Event when Animation finishes slider.bind('nivo:animFinished', function(){ sliderImg.attr('src', vars.currentImage.attr('src')); vars.running = false; // Hide child links $(kids).each(function(){ if($(this).is('a')){ $(this).css('display','none'); } }); // Show current link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Restart the timer if(timer === '' && !vars.paused && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Trigger the afterChange callback settings.afterChange.call(this); }); // Add slices for slice animations var createSlices = function(slider, settings, vars) { if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height(); for(var i = 0; i < settings.slices; i++){ var sliceWidth = Math.round(slider.width()/settings.slices); if(i === settings.slices-1){ slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:(slider.width()-(sliceWidth*i))+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } else { slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:sliceWidth+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } } $('.nivo-slice', slider).height(sliceHeight); sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Add boxes for box animations var createBoxes = function(slider, settings, vars){ if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var boxWidth = Math.round(slider.width()/settings.boxCols), boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows); for(var rows = 0; rows < settings.boxRows; rows++){ for(var cols = 0; cols < settings.boxCols; cols++){ if(cols === settings.boxCols-1){ slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:(slider.width()-(boxWidth*cols))+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } else { slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:boxWidth+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } } } sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Private run method var nivoRun = function(slider, kids, settings, nudge){ // Get our vars var vars = slider.data('nivo:vars'); // Trigger the lastSlide callback if(vars && (vars.currentSlide === vars.totalSlides - 1)){ settings.lastSlide.call(this); } // Stop if((!vars || vars.stop) && !nudge) { return false; } // Trigger the beforeChange callback settings.beforeChange.call(this); // Set current background before change if(!nudge){ sliderImg.attr('src', vars.currentImage.attr('src')); } else { if(nudge === 'prev'){ sliderImg.attr('src', vars.currentImage.attr('src')); } if(nudge === 'next'){ sliderImg.attr('src', vars.currentImage.attr('src')); } } vars.currentSlide++; // Trigger the slideshowEnd callback if(vars.currentSlide === vars.totalSlides){ vars.currentSlide = 0; settings.slideshowEnd.call(this); } if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); } // Set vars.currentImage if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Set active links if(settings.controlNav){ $('a', vars.controlNavEl).removeClass('active'); $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); } // Process caption processCaption(settings); // Remove any slices from last transition $('.nivo-slice', slider).remove(); // Remove any boxes from last transition $('.nivo-box', slider).remove(); var currentEffect = settings.effect, anims = ''; // Generate random effect if(settings.effect === 'random'){ anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade', 'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse'); currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Run random effect from specified set (eg: effect:'fold,fade') if(settings.effect.indexOf(',') !== -1){ anims = settings.effect.split(','); currentEffect = anims[Math.floor(Math.random()*(anims.length))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Custom transition as defined by "data-transition" attribute if(vars.currentImage.attr('data-transition')){ currentEffect = vars.currentImage.attr('data-transition'); } // Run effects vars.running = true; var timeBuff = 0, i = 0, slices = '', firstSlice = '', totalBoxes = '', boxes = ''; if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'top': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'bottom': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; var v = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); if(i === 0){ slice.css('top','0px'); i++; } else { slice.css('bottom','0px'); i = 0; } if(v === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; v++; }); } else if(currentEffect === 'fold'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; $('.nivo-slice', slider).each(function(){ var slice = $(this); var origWidth = slice.width(); slice.css({ top:'0px', width:'0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'fade'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': slider.width() + 'px' }); firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInRight'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInLeft'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1', 'left': '', 'right': '0px' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ // Reset positioning firstSlice.css({ 'left': '0px', 'right': '' }); slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'boxRandom'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; boxes = shuffle($('.nivo-box', slider)); boxes.each(function(){ var box = $(this); if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 20; i++; }); } else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; // Split boxes into 2D array var rowIndex = 0; var colIndex = 0; var box2Darr = []; box2Darr[rowIndex] = []; boxes = $('.nivo-box', slider); if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){ boxes = $('.nivo-box', slider)._reverse(); } boxes.each(function(){ box2Darr[rowIndex][colIndex] = $(this); colIndex++; if(colIndex === settings.boxCols){ rowIndex++; colIndex = 0; box2Darr[rowIndex] = []; } }); // Run animation for(var cols = 0; cols < (settings.boxCols * 2); cols++){ var prevCol = cols; for(var rows = 0; rows < settings.boxRows; rows++){ if(prevCol >= 0 && prevCol < settings.boxCols){ /* Due to some weird JS bug with loop vars being used in setTimeout, this is wrapped with an anonymous function call */ (function(row, col, time, i, totalBoxes) { var box = $(box2Darr[row][col]); var w = box.width(); var h = box.height(); if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ box.width(0).height(0); } if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + time)); } else { setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3); }, (100 + time)); } })(rows, prevCol, timeBuff, i, totalBoxes); i++; } prevCol--; } timeBuff += 100; } } }; // Shuffle an array var shuffle = function(arr){ for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x); return arr; }; // For debugging var trace = function(msg){ if(this.console && typeof console.log !== 'undefined') { console.log(msg); } }; // Start / Stop this.stop = function(){ if(!$(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = true; trace('Stop Slider'); } }; this.start = function(){ if($(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = false; trace('Start Slider'); } }; // Trigger the afterLoad callbac
javascript
jquery
nivoslider
nivo
null
06/29/2012 11:55:56
not a real question
Nivo Slider: Move thumbs inside caption? === I am using Nivo Slider 3.0.1 on a website for a hotel. I am using image thumbnails for my control nav, they appear underneath the slideshow and work perfectly. http://nivo.dev7studios.com/ I would love to somehow move the thumbnail control navigation so it is inside the captions that overlay my slideshow images and on the left of the text placed in there. Unfortunately, javascript isn't my forte, and I'm not sure how to accomplish this. Has anybody done this before? Here is the plugin code for quick reference: /* * jQuery Nivo Slider v3.0.1 * http://nivo.dev7studios.com * * Copyright 2012, Dev7studios * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function($) { var NivoSlider = function(element, options){ // Defaults are below var settings = $.extend({}, $.fn.nivoSlider.defaults, options); // Useful variables. Play carefully. var vars = { currentSlide: 0, currentImage: '', totalSlides: 0, running: false, paused: false, stop: false, controlNavEl: false }; // Get this slider var slider = $(element); slider.data('nivo:vars', vars).addClass('nivoSlider'); // Find our slider children var kids = slider.children(); kids.each(function() { var child = $(this); var link = ''; if(!child.is('img')){ if(child.is('a')){ child.addClass('nivo-imageLink'); link = child; } child = child.find('img:first'); } // Get img width & height var childWidth = (childWidth === 0) ? child.attr('width') : child.width(), childHeight = (childHeight === 0) ? child.attr('height') : child.height(); if(link !== ''){ link.css('display','none'); } child.css('display','none'); vars.totalSlides++; }); // If randomStart if(settings.randomStart){ settings.startSlide = Math.floor(Math.random() * vars.totalSlides); } // Set startSlide if(settings.startSlide > 0){ if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; } vars.currentSlide = settings.startSlide; } // Get initial image if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Show initial link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Set first background var sliderImg = $('<img class="nivo-main-image" src="#" />'); sliderImg.attr('src', vars.currentImage.attr('src')).show(); slider.append(sliderImg); // Detect Window Resize $(window).resize(function() { slider.children('img').width(slider.width()); sliderImg.attr('src', vars.currentImage.attr('src')); sliderImg.stop().height('auto'); $('.nivo-slice').remove(); $('.nivo-box').remove(); }); //Create caption slider.append($('<div class="nivo-caption"></div>')); // Process caption function var processCaption = function(settings){ var nivoCaption = $('.nivo-caption', slider); if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){ var title = vars.currentImage.attr('title'); if(title.substr(0,1) == '#') title = $(title).html(); if(nivoCaption.css('display') == 'block'){ setTimeout(function(){ nivoCaption.html(title); }, settings.animSpeed); } else { nivoCaption.html(title); nivoCaption.stop().fadeIn(settings.animSpeed); } } else { nivoCaption.stop().fadeOut(settings.animSpeed); } } //Process initial caption processCaption(settings); // In the words of Super Mario "let's a go!" var timer = 0; if(!settings.manualAdvance && kids.length > 1){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Add Direction nav if(settings.directionNav){ slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>'); // Hide Direction nav if(settings.directionNavHide){ $('.nivo-directionNav', slider).hide(); slider.hover(function(){ $('.nivo-directionNav', slider).show(); }, function(){ $('.nivo-directionNav', slider).hide(); }); } $('a.nivo-prevNav', slider).live('click', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; vars.currentSlide -= 2; nivoRun(slider, kids, settings, 'prev'); }); $('a.nivo-nextNav', slider).live('click', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; nivoRun(slider, kids, settings, 'next'); }); } // Add Control nav if(settings.controlNav){ vars.controlNavEl = $('<div class="nivo-controlNav"></div>'); slider.after(vars.controlNavEl); for(var i = 0; i < kids.length; i++){ if(settings.controlNavThumbs){ vars.controlNavEl.addClass('nivo-thumbs-enabled'); var child = kids.eq(i); if(!child.is('img')){ child = child.find('img:first'); } if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>'); } else { vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>'); } } //Set initial active link $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); $('a', vars.controlNavEl).bind('click', function(){ if(vars.running) return false; if($(this).hasClass('active')) return false; clearInterval(timer); timer = ''; sliderImg.attr('src', vars.currentImage.attr('src')); vars.currentSlide = $(this).attr('rel') - 1; nivoRun(slider, kids, settings, 'control'); }); } //For pauseOnHover setting if(settings.pauseOnHover){ slider.hover(function(){ vars.paused = true; clearInterval(timer); timer = ''; }, function(){ vars.paused = false; // Restart the timer if(timer === '' && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } }); } // Event when Animation finishes slider.bind('nivo:animFinished', function(){ sliderImg.attr('src', vars.currentImage.attr('src')); vars.running = false; // Hide child links $(kids).each(function(){ if($(this).is('a')){ $(this).css('display','none'); } }); // Show current link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Restart the timer if(timer === '' && !vars.paused && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Trigger the afterChange callback settings.afterChange.call(this); }); // Add slices for slice animations var createSlices = function(slider, settings, vars) { if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height(); for(var i = 0; i < settings.slices; i++){ var sliceWidth = Math.round(slider.width()/settings.slices); if(i === settings.slices-1){ slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:(slider.width()-(sliceWidth*i))+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } else { slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:sliceWidth+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } } $('.nivo-slice', slider).height(sliceHeight); sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Add boxes for box animations var createBoxes = function(slider, settings, vars){ if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var boxWidth = Math.round(slider.width()/settings.boxCols), boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows); for(var rows = 0; rows < settings.boxRows; rows++){ for(var cols = 0; cols < settings.boxCols; cols++){ if(cols === settings.boxCols-1){ slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:(slider.width()-(boxWidth*cols))+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } else { slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:boxWidth+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } } } sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Private run method var nivoRun = function(slider, kids, settings, nudge){ // Get our vars var vars = slider.data('nivo:vars'); // Trigger the lastSlide callback if(vars && (vars.currentSlide === vars.totalSlides - 1)){ settings.lastSlide.call(this); } // Stop if((!vars || vars.stop) && !nudge) { return false; } // Trigger the beforeChange callback settings.beforeChange.call(this); // Set current background before change if(!nudge){ sliderImg.attr('src', vars.currentImage.attr('src')); } else { if(nudge === 'prev'){ sliderImg.attr('src', vars.currentImage.attr('src')); } if(nudge === 'next'){ sliderImg.attr('src', vars.currentImage.attr('src')); } } vars.currentSlide++; // Trigger the slideshowEnd callback if(vars.currentSlide === vars.totalSlides){ vars.currentSlide = 0; settings.slideshowEnd.call(this); } if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); } // Set vars.currentImage if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Set active links if(settings.controlNav){ $('a', vars.controlNavEl).removeClass('active'); $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); } // Process caption processCaption(settings); // Remove any slices from last transition $('.nivo-slice', slider).remove(); // Remove any boxes from last transition $('.nivo-box', slider).remove(); var currentEffect = settings.effect, anims = ''; // Generate random effect if(settings.effect === 'random'){ anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade', 'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse'); currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Run random effect from specified set (eg: effect:'fold,fade') if(settings.effect.indexOf(',') !== -1){ anims = settings.effect.split(','); currentEffect = anims[Math.floor(Math.random()*(anims.length))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Custom transition as defined by "data-transition" attribute if(vars.currentImage.attr('data-transition')){ currentEffect = vars.currentImage.attr('data-transition'); } // Run effects vars.running = true; var timeBuff = 0, i = 0, slices = '', firstSlice = '', totalBoxes = '', boxes = ''; if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'top': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'bottom': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; var v = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); if(i === 0){ slice.css('top','0px'); i++; } else { slice.css('bottom','0px'); i = 0; } if(v === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; v++; }); } else if(currentEffect === 'fold'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; $('.nivo-slice', slider).each(function(){ var slice = $(this); var origWidth = slice.width(); slice.css({ top:'0px', width:'0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'fade'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': slider.width() + 'px' }); firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInRight'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInLeft'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1', 'left': '', 'right': '0px' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ // Reset positioning firstSlice.css({ 'left': '0px', 'right': '' }); slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'boxRandom'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; boxes = shuffle($('.nivo-box', slider)); boxes.each(function(){ var box = $(this); if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 20; i++; }); } else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; // Split boxes into 2D array var rowIndex = 0; var colIndex = 0; var box2Darr = []; box2Darr[rowIndex] = []; boxes = $('.nivo-box', slider); if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){ boxes = $('.nivo-box', slider)._reverse(); } boxes.each(function(){ box2Darr[rowIndex][colIndex] = $(this); colIndex++; if(colIndex === settings.boxCols){ rowIndex++; colIndex = 0; box2Darr[rowIndex] = []; } }); // Run animation for(var cols = 0; cols < (settings.boxCols * 2); cols++){ var prevCol = cols; for(var rows = 0; rows < settings.boxRows; rows++){ if(prevCol >= 0 && prevCol < settings.boxCols){ /* Due to some weird JS bug with loop vars being used in setTimeout, this is wrapped with an anonymous function call */ (function(row, col, time, i, totalBoxes) { var box = $(box2Darr[row][col]); var w = box.width(); var h = box.height(); if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ box.width(0).height(0); } if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + time)); } else { setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3); }, (100 + time)); } })(rows, prevCol, timeBuff, i, totalBoxes); i++; } prevCol--; } timeBuff += 100; } } }; // Shuffle an array var shuffle = function(arr){ for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x); return arr; }; // For debugging var trace = function(msg){ if(this.console && typeof console.log !== 'undefined') { console.log(msg); } }; // Start / Stop this.stop = function(){ if(!$(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = true; trace('Stop Slider'); } }; this.start = function(){ if($(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = false; trace('Start Slider'); } }; // Trigger the afterLoad callbac
1
1,976,764
12/29/2009 20:24:40
74,168
03/05/2009 10:09:31
146
12
Experience with Architecture Description Languages
Being familiar with graphical modeling tools, I recently thought about the concept of architecture description languages (ADL) where one describes architectures in a textual form in order to comprehensively document it. I see advantages in this approach since it is a formal definition of an architecture stored in a single place without need to switch between graphical and text editors all the time. Kind of the TeX way of describing architectures. I have been looking a bit but only found quite dated research material. Do you have experience with productive usage of an ADL? What works, what does not work? Is there a toolset available which supports document generation from an ADL? Including rendering images of the architecture, describing components and interfaces and component hierachies? And probably even using that to describe dynamic behaviour?
architecture
software-engineering
null
null
null
null
open
Experience with Architecture Description Languages === Being familiar with graphical modeling tools, I recently thought about the concept of architecture description languages (ADL) where one describes architectures in a textual form in order to comprehensively document it. I see advantages in this approach since it is a formal definition of an architecture stored in a single place without need to switch between graphical and text editors all the time. Kind of the TeX way of describing architectures. I have been looking a bit but only found quite dated research material. Do you have experience with productive usage of an ADL? What works, what does not work? Is there a toolset available which supports document generation from an ADL? Including rendering images of the architecture, describing components and interfaces and component hierachies? And probably even using that to describe dynamic behaviour?
0