unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Can monkeyrunner interact with android notifications? === I'm starting to look at android monkeyrunner, and would like to test my application with it. My application opens a Notification in the android pull-down menu, and I would like monkeyrunner to test if the notification behaves correctly. Is it possible to use monkeyrunner to "click" on an incoming notification and verify the result? I've searched the documentation, and it seems like I can only test activities, but maybe I'm missing something.
0
[ 2, 92, 11861, 12993, 10001, 29, 13005, 52, 4634, 18, 60, 800, 3726, 3726, 31, 22, 79, 1422, 20, 361, 35, 13005, 11861, 12993, 15, 17, 83, 101, 20, 1289, 51, 3010, 29, 32, 9, 51, 3010, 8965, 21, 52, 4634, 19, 14, 13005, 2201, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Code for reuploading an image === I have written a php code for uploading an image to store into database id, name, type and size and echo the image and it works fine. I need the user to have the opportunity to reupload in (update) the datadase (with the same id) a new image and delete the old one if image file is chosen. Any help would be usefull.
3
[ 2, 1797, 26, 302, 576, 16866, 40, 1961, 800, 3726, 3726, 31, 57, 642, 21, 13, 26120, 1797, 26, 71, 16866, 40, 1961, 20, 1718, 77, 6018, 4924, 15, 204, 15, 1001, 17, 1072, 17, 8117, 14, 1961, 17, 32, 693, 1123, 9, 31, 376, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
301 Redirect Any Segment to First Segment === Im trying to redirect pages such as: > /selected-work/project-name-1<br> > /selected-work/project-name-2<br> > /selected-work/project-name-3<br> > /selected-work/category/category-name<br> to just > /work/ Is there a 301 redirect I can use that will notice it has a segment AFTER the first, and redirect ALL? Using .htaccess
0
[ 2, 13, 18979, 302, 14706, 186, 5631, 20, 64, 5631, 800, 3726, 3726, 797, 749, 20, 302, 14706, 4434, 145, 28, 45, 13, 1, 13, 118, 18, 7138, 8, 3783, 118, 21011, 8, 7259, 8, 165, 1, 5145, 1, 13, 1, 13, 118, 18, 7138, 8, 3783, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
relative path in Java === My program has to use certain files that reside in another directory. Right now I am using absolute path to specify the location of the files. But I know that the relative position of these files will remain the same compared to where my program is residing. How I can use relative path in Java to specify the location of these files ? > For example my program is residing in > /home/username/project/src/com/xyz/ > > and the target files are in /home/username/project/secure/
0
[ 2, 4543, 2013, 19, 8247, 800, 3726, 3726, 51, 625, 63, 20, 275, 1200, 6488, 30, 14670, 19, 226, 16755, 9, 193, 130, 31, 589, 568, 7070, 2013, 20, 19077, 14, 1474, 16, 14, 6488, 9, 47, 31, 143, 30, 14, 4543, 649, 16, 158, 6488,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NSIS Plugin "nsScreenshot" not working in Windows NT 6.x === I added a code that was published 3 years later than original plugin, but it still returns error... Code is straight forward imho ... but still I most likely miss some aspect ... See this paste: http://pastebin.com/PvxxhtEg Search for `ScreenToFile`. Thanks for any input,. This plugin is vital for installer documentation generatio nautomatization.
0
[ 2, 13, 103, 4557, 10922, 108, 13, 7, 2172, 7187, 7868, 7, 52, 638, 19, 1936, 13, 2877, 400, 9, 396, 800, 3726, 3726, 31, 905, 21, 1797, 30, 23, 467, 203, 122, 138, 119, 501, 10922, 108, 15, 47, 32, 174, 4815, 7019, 9, 9, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ignore folders using .gitignore? === I have a few folders, cache scattered throughout a webapp. I am tracking the project with Git. I have added empty index.html files to each cache folder. I want to ignore all contents of the `cache` folders, but by default the folders are empty, hence the reason for the index.html. I have tried *cache/* !*cache/index.html But it is not ignoring them.
0
[ 2, 7174, 19294, 18, 568, 13, 9, 10404, 23565, 99, 60, 800, 3726, 3726, 31, 57, 21, 310, 19294, 18, 15, 16522, 7471, 892, 21, 2741, 7753, 9, 31, 589, 10353, 14, 669, 29, 13, 10404, 9, 31, 57, 905, 2424, 4348, 9, 15895, 6488, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Drupal Views 6.x-2.x not rendering correctly === I have a view defined in my drupal admin which outputs a blogs listing. The problem is that when I try to view it in the frontend, the listing displays with the mark-up that is appearing when I preview it in the admin and not with the expected one. I've run `drush cc` all to eliminate the possibility of a caching issue. I'm new with drupal and views. Any thoughts? Thanks, Radu
0
[ 2, 15708, 6720, 4146, 400, 9, 396, 8, 135, 9, 396, 52, 15307, 12044, 800, 3726, 3726, 31, 57, 21, 1418, 2811, 19, 51, 15708, 6720, 21, 43, 2160, 56, 5196, 18, 21, 8146, 18, 9554, 9, 14, 1448, 25, 30, 76, 31, 1131, 20, 1418, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Error with viewpager === This is my code import android.content.Context; import android.os.Bundle; import android.os.Parcelable; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.widget.ScrollView; import android.widget.TextView; public class CurrentActivity extends InfoActivity { private ViewPager columnas; private static int NUM_COLUMNAS = 4; private Context cxt; private ColumnAdapter miAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_current); info(); cxt = this; miAdapter = new ColumnAdapter(); columnas = (ViewPager) findViewById(R.id.columnas); columnas.setAdapter(miAdapter); TitlePageIndicator titleIndicator = (TitlePageIndicator) findViewById(R.id.titles); titleIndicator.setViewPager(columnas); } private class ColumnAdapter extends PagerAdapter { @Override public int getCount() { return NUM_COLUMNAS; } @Override public Object instantiateItem(View collection, int position) { ScrollView v = (ScrollView) LayoutInflater.from(cxt).inflate( R.layout.info, null); if (position == 0) { v = (ScrollView) LayoutInflater.from(cxt).inflate( R.layout.info, null); } else if (position == 1) { v = (ScrollView) LayoutInflater.from(cxt).inflate( R.layout.look, null); } else if (position == 2) { v = (ScrollView) LayoutInflater.from(cxt).inflate( R.layout.touch, null); } else if (position == 3) { v = (ScrollView) LayoutInflater.from(cxt).inflate( R.layout.tilt, null); } ((ViewPager) collection).addView(v, 0); return v; } @Override public void destroyItem(View collection, int position, Object view) { ((ViewPager) collection).removeView((ScrollView) view); } @Override public boolean isViewFromObject(View view, Object object) { return view == ((ScrollView) object); } @Override public void finishUpdate(View arg0) { } @Override public void restoreState(Parcelable arg0, ClassLoader arg1) { } @Override public Parcelable saveState() { return null; } @Override public void startUpdate(View arg0) { } @Override public CharSequence getPageTitle(int position) { String a = null; TextView info = (TextView) findViewById(R.id.info_textview_info); TextView look = (TextView) findViewById(R.id.info_textview_look); TextView touch = (TextView) findViewById(R.id.info_textview_touch); TextView tilt = (TextView) findViewById(R.id.info_textview_tilt); if (position == 0) { a = getResources().getString(R.string.info).toUpperCase(); info.setText((R.string.one_lev_info)); info.setGravity(Gravity.LEFT); info.setTextSize(15); } else if (position == 1) { a = getResources().getString(R.string.look).toUpperCase(); look.setText((R.string.one_lev_look)); look.setGravity(Gravity.LEFT); look.setTextSize(15); } else if (position == 2) { a = getResources().getString(R.string.touch).toUpperCase(); touch.setText((R.string.one_lev_look)); touch.setGravity(Gravity.LEFT); touch.setTextSize(15); } else if (position == 3) { a = getResources().getString(R.string.tilt).toUpperCase(); tilt.setText((R.string.one_lev_look)); tilt.setGravity(Gravity.LEFT); tilt.setTextSize(15); } return a; } } Ok this is my layout for info for example: <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/ScrollView01" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingBottom="5dp" android:paddingLeft="10dp" android:paddingRight="10dp" > <TextView android:id="@+id/info_textview_look" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:text="@string/look_no" android:textColor="#4D4D4D" android:textSize="25dp" android:textStyle="normal" /> </ScrollView> and this is the XML with the text: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="one_lev_info">The shows a 1789</string> <string name="one_lev_look">consisting of rhomboid</string> </resources> But when I run it, it shows me the error in the java file, in function getPageTitle, on the line touch.setText((R.string.one_lev_look)); But when I remove everything connected with Textview touch and tilt, its okay. So i tried to had only 3 columns and it makes still the problems only with the third column. Maybe I am wrong. What do you suggest?
0
[ 2, 7019, 29, 1418, 6486, 139, 800, 3726, 3726, 48, 25, 51, 1797, 9010, 13005, 9, 25424, 9, 1126, 11969, 73, 9010, 13005, 9, 759, 9, 9930, 413, 73, 9010, 13005, 9, 759, 9, 22773, 532, 579, 73, 9010, 13005, 9, 24168, 9, 710, 300, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.NET Design Patterns (tiers) === I support and develop a large ASP.NET application (I am a sole developer). I am trying to adopt a structured approach to coding by using design patterns, but I have not yet managed to grasp the subject fully. I was thinking about using a MVP pattern for the user interface and a data tier to separate the business logic and the data logic (two patterns in total). For example, have a look at the code below: Imports System.Data.SqlClient Imports System.Web.Configuration Partial Class _Default Inherits System.Web.UI.Page Private _ConString As String Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try If Session("OrderID") > " " Then 'Line 10 Dim objDR As SqlDataReader _ConString = WebConfigurationManager.ConnectionStrings("TestConnection").ConnectionString Dim objCon As New SqlConnection(_ConString) Dim objCommand As New SqlCommand objCommand.CommandText = "SELECT * FROM Person WHERE ID = " & session("id") objCon.Open() objCommand.Connection = objCon objDR = objCommand.ExecuteReader Do While objDR.Read MsgBox(objDR("name")) Loop objDR.Close() End If Catch ex As Exception Throw End Try End Sub End Class This breaks a lot of SOLID rules. There is data logic and business logic in the presentation layer (line 10 is the business logic). I was thinking about creating two new classes i.e. PersonDAL (for the data access layer) and PersonBLL for the business logic layer. The business logic layer and the data access layer will have the same function names i.e. getPerson() i.e. the presentation layer will call getPerson in the BLL layer which will call getPerson in the DAL. My question is: is this a good apprach or is there a better way to break up this function into tiers? I have looked at the following link, which talks about this approach when using datasets, but I am not using datasets i.e. I am using SQLCommands and SQLDataReaders: http://msdn.microsoft.com/en-us/library/aa581779.aspx.
0
[ 2, 13, 9, 2328, 704, 6282, 13, 5, 5259, 18, 6, 800, 3726, 3726, 31, 555, 17, 2803, 21, 370, 28, 306, 9, 2328, 3010, 13, 5, 49, 589, 21, 5005, 10058, 6, 9, 31, 589, 749, 20, 9512, 21, 17784, 2141, 20, 13, 15458, 34, 568, 70...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Detect diagonal swipe gestures in a UIView === I want to detect a two-finger diagonal swipe that starts from the bottom right of the screen to the middle. I tried adding UISwipeGestureRecognizer with direction set as "UISwipeGestureRecognizerDirectionUp | UISwipeGestureRecognizerDirectionLeft" but to no vail as the handler is getting invoked even if I start the swipe from the middle of the screen to the top left. Do I need to sub-class UIGestureRecognizer or can I handle this using touchesBegan and touchesMoved ?
0
[ 2, 9092, 16807, 27246, 7222, 18, 19, 21, 13, 5661, 4725, 800, 3726, 3726, 31, 259, 20, 9092, 21, 81, 8, 18485, 16807, 27246, 30, 3244, 37, 14, 2129, 193, 16, 14, 2324, 20, 14, 772, 9, 31, 794, 4721, 287, 403, 27803, 12906, 18, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Now, how can I screen-scrap such a html line (using java)? === I am trying to screen-scrap a html page so I can extract desired valuable data from it and into a text file. So far it's going well until I came across this within the html page: <td> <b>In inventory</b>: 0.3 &#107;&#103;<br /><b>Equipped</b>: -4.5&#160;kg The above line in the html code for the page often varies. So it need to figure about a way to scan the line (regardless of what it contains) for the weight (in this case would be ***0.3*** and ***-4.5***) and store this data into 2 seperate **doubles** as of such: **double** inventoryWeight = **0.3** <br>**double** equippedWeight = **-4.5**</br> I would like this to be done using pure java; if need be, do not hesitate to notify me of any third-party programs which can be executed within my java application to achieve this (but please vividly explain if so). Thank you a bunch!
0
[ 2, 130, 15, 184, 92, 31, 2324, 8, 3862, 10817, 145, 21, 13, 15895, 293, 13, 5, 12655, 8247, 6, 60, 800, 3726, 3726, 31, 589, 749, 20, 2324, 8, 3862, 10817, 21, 13, 15895, 2478, 86, 31, 92, 10962, 9264, 5940, 1054, 37, 32, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Largest contiguous submatrix of "true" elements === This is an interview question: given a boolean matrix find the size of the largest contiguous square sub-matrix, which contains only "true" elements. I found this [question][1] on SO but did not understand the answer. The proposed algorithm moves a diagonal line from the left top to the right bottom and keeps track of the rectangles of "true" elements as the line goes. My questions; - How to keep track of the rectangles? - Why do we move the _diagonal_ line? What if we move a vertical/horizontal line or both? - How to calculate the algorithm complexity? [1]: http://stackoverflow.com/questions/4482408/find-the-largest-sub-matrix-full-of-ones-in-linear-time
0
[ 2, 1075, 1065, 8407, 9627, 972, 540, 17224, 16, 13, 7, 13398, 7, 2065, 800, 3726, 3726, 48, 25, 40, 2421, 1301, 45, 504, 21, 9827, 413, 210, 8187, 477, 14, 1072, 16, 14, 1075, 1065, 8407, 9627, 735, 972, 8, 540, 17224, 15, 56, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
responseXML always is null in firefox === i want to call web service with soapclinet by javascript, and use the [soapclinet library][1], but always responsexml always is null in firefox 13. i read all questions about this problem but i didnt resolve problem, this code run IE browser without problem. even a sample code responsexml is null in firefox and chrome. please help me. thanks. [1]: http://javascriptsoapclient.codeplex.com
0
[ 2, 1627, 396, 8184, 550, 25, 16203, 19, 535, 18219, 800, 3726, 3726, 31, 259, 20, 645, 2741, 365, 29, 6447, 16799, 1198, 34, 8247, 8741, 15, 17, 275, 14, 636, 656, 2552, 16799, 1198, 1248, 500, 2558, 165, 500, 15, 47, 550, 1627, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
django RESTful APIs using simple views === I am writing an HTML5 frontend mobile app and thinking of creating RESTful APIs for getting data from server. For backend I am using Django, thus I was going thru various options available in Django for RESTful APIs, I came across tastypie, piston etc. I got some of advantages of using these frameworks (like security etc) but I am still unclear on disadvantages of using plain django view based RESTful APIs. I am thinking to POST JSON object to plain django view, parse and process it and store it in Data base. Similarly send GET request to django view, load data from various DB tables and send JSON object back as response (as mimetype as application/json). I was experimenting with above and so far it seems it will work. I need to get PROs/CONs on using various frameworks vs simple django views for production system for RESTful APIs.
0
[ 2, 3857, 14541, 760, 1566, 21, 8954, 568, 1935, 4146, 800, 3726, 3726, 31, 589, 1174, 40, 13, 15895, 264, 431, 2451, 3241, 4865, 17, 1440, 16, 2936, 760, 1566, 21, 8954, 26, 1017, 1054, 37, 8128, 9, 26, 97, 2451, 31, 589, 568, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the correct HTML semantic tag for generated data in a list? === If I want to generate a receipt for users, what tag should I use for purchase date, item, cost etc. I know I'll use labels for the categories. <ul> <li> <label> Item </label> <span> Poster(is span correct for this area?) </span> </li> <li> <label> Date </label> <span> XX/XX/20XX </span> </li> <li> <label> Cost </label> <span> $10 </span> </li> </ul> Is Span a good one? Or something else? Thank you
0
[ 2, 98, 25, 14, 4456, 13, 15895, 17220, 3383, 26, 6756, 1054, 19, 21, 968, 60, 800, 3726, 3726, 100, 31, 259, 20, 7920, 21, 20069, 26, 3878, 15, 98, 3383, 378, 31, 275, 26, 3301, 1231, 15, 9101, 15, 1516, 2722, 9, 31, 143, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android Google GCM - Is it possible to display alert when device is in sleep mode with security enabled? === I am working with an Android developer who is learning the API as we develop a program. We use Google Cloud Messaging to receive message on Android devices. Developer tells me that it's not possible to display GCM message on device if device is in sleep mode with security enabled. Is that true? (Using API > 2.3....4.0). Device will be secured by either pattern or face recognition. We want the GCM message to display regardless of the state of the device. Ideally we want the device to stay locked but also show the message, if not possible, we can settle for unlock device automatically and wake up to show the message. Feedback is much appreciated.
0
[ 2, 13005, 8144, 489, 9095, 13, 8, 25, 32, 938, 20, 3042, 7863, 76, 3646, 25, 19, 1742, 3740, 29, 1221, 9338, 60, 800, 3726, 3726, 31, 589, 638, 29, 40, 13005, 10058, 72, 25, 2477, 14, 21, 2159, 28, 95, 2803, 21, 625, 9, 95, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
NSManagedObjectContext method save doesnt work, why? === Hi I`ve application IOS 5.1 with main context and some side. I merge changes between side and main by notification. Sometimes i got that siutation when I try save changes in one of my context by method save nothing happens. I have to rebuild my app and then its works. Everything works good but sometimes i got that situation method save for managedObjectContext not working. What could make that siutation?
0
[ 2, 13, 2172, 177, 8030, 23793, 1126, 11969, 2109, 2079, 5886, 170, 15, 483, 60, 800, 3726, 3726, 4148, 31, 1, 195, 3010, 13, 7760, 331, 9, 165, 29, 407, 4141, 17, 109, 270, 9, 31, 12666, 1693, 128, 270, 17, 407, 34, 52, 4634, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Variables not in global scope file include === I am trying to assign variables out of global scope and allow a included file with access to these vars. This is what I have: <script type="text/javascript"> (function(){ var cm_url = "http://test.com/mikelbring/1313-myproducthere"; var cm_text = "Buy"; var z = document.createElement("script"); z.src = "button.js"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s); })(); </script> The script doesn't have access to the vars. What can I do to give it access to the vars but keep them out of the global scope? Thanks!
0
[ 2, 12157, 52, 19, 2062, 9914, 3893, 468, 800, 3726, 3726, 31, 589, 749, 20, 13952, 12157, 70, 16, 2062, 9914, 17, 1655, 21, 506, 3893, 29, 1381, 20, 158, 4033, 18, 9, 48, 25, 98, 31, 57, 45, 13, 1, 8741, 1001, 3726, 7, 11969, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wsdl usage on client side === After generating the artefacts for a WS client why is needed the wsdllocation reference ? Is the WSDL needed on runtime ? Why ? After generation the artefacts is not enough to run the client without a reference (remote or local to a wsdl) ? I might see a reason for some validation BUt that should not be optional ? Regards Cristian.
0
[ 2, 619, 18, 8643, 7514, 27, 6819, 270, 800, 3726, 3726, 75, 13500, 14, 27284, 26, 21, 619, 18, 6819, 483, 25, 851, 14, 619, 18, 8643, 19032, 2801, 13, 60, 25, 14, 619, 18, 8643, 851, 27, 485, 891, 13, 60, 483, 13, 60, 75, 27...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customizable Shortcuts in Java Application === I would like to include customizable keyboard shortcuts in my Java application (the user can change them). Since this is not very unusual request, I was wondering if there exists a library/project that could help me achieve my goal. Unfortunately I was not able to find anything useful on Google. Thank you, aZen
0
[ 2, 5816, 3186, 579, 502, 4118, 18, 19, 8247, 3010, 800, 3726, 3726, 31, 83, 101, 20, 468, 5816, 3186, 579, 8896, 502, 4118, 18, 19, 51, 8247, 3010, 13, 5, 124, 4155, 92, 753, 105, 6, 9, 179, 48, 25, 52, 253, 4706, 3772, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CheckBox on Windows Phone Page === How can I check is there checkbox on my windows phone page? So, I add WrapPanel to my page: _wp = new WrapPanel { Orientation = System.Windows.Controls.Orientation.Horizontal, Height = 80, }; _tb = new TextBlock { Text = gameText, Width = 250 }; _wp.Children.Add(_tb); _cb = new CheckBox(); _wp.Children.Add(_cb); this.Items.Add(_wp); but I need write handlers to checkbox. I can't do something about this: > > _cb = new CheckBox { CheckedChanged += my_handler } So, how can I do it?
0
[ 2, 2631, 5309, 27, 1936, 1132, 2478, 800, 3726, 3726, 184, 92, 31, 2631, 25, 80, 2631, 5309, 27, 51, 1936, 1132, 2478, 60, 86, 15, 31, 3547, 8118, 3206, 532, 20, 51, 2478, 45, 13, 1, 13790, 800, 78, 8118, 3206, 532, 13, 1, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can I allow multiple programs to read from the same file at the same time? === I have an application that reads a set of data files and performs some model computations. The program does not need to modify the data files themselves, so I'm currently opening them with the read-only flag as shown below: FILE* file; if(_wfopen_s(&file, fname.c_str(), L"r") == 0) ... I would like to have several instances of my program running at the same time, using the same set of data, but performing different computations on the data. None of my programs need to modify the data files. As the data files are very large, I can't make separate copies of the data to use with each program. I assumed that because I'm opening the files with read-only permissions, two programs could be reading from the same file at the same time. Instead, I get various errors along the lines of "the file could not be open because it is being used by another process". As my development environment is Windows 7, [this question suggests it might be a matter of enabling read sharing][1]. However, all of the answers in that thread rely on [CreateFile][2], whereas I'm dealing with legacy code that was written with stdio.h. Is there a way I can have several programs concurrently read from a file using the fopen class of functions? [1]:http://stackoverflow.com/a/823525/538247 [2]:http://msdn.microsoft.com/en-us/library/aa363858(v=vs.85).aspx
0
[ 2, 92, 31, 1655, 1886, 1726, 20, 1302, 37, 14, 205, 3893, 35, 14, 205, 85, 60, 800, 3726, 3726, 31, 57, 40, 3010, 30, 11137, 21, 309, 16, 1054, 6488, 17, 11563, 109, 1061, 21683, 18, 9, 14, 625, 630, 52, 376, 20, 17579, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
A HTML page doesn't display right in a QWebview === I'm doing a little software that has a `QWebView`to display `HTML`files. My problem is that my welcome page doesn't display well. It looks like ![this][1] when it should have an image between those red lines, in the center. The problem is surely my `HTML`and/or `CSS. So here is my `HTML`: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> <link href="styles/accueil.css" rel="stylesheet" type="text/css" media="screen" /> </head> <body> <div class="container"> <div class="ligne">&nbsp;</div> </div> <div class="ligne">&nbsp;</div> </body> </html> And my `CSS`: @charset "UTF-8"; /* CSS Document */ body{ background-color:white; margin:0 auto; height:100%; } html { overflow-y: scroll; height:100%; } img{ border:none; } .container { min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -20px; background-image: url(../icones/accueil.jpg); background-repeat:no-repeat; background-position:center center; } .ligne{ width:100%; height: 20px; background-color:#ee1b2e; } Any idea of what I wrote wrong? Thanks! [1]: http://i.stack.imgur.com/DSy7W.png
0
[ 2, 21, 13, 15895, 2478, 1437, 22, 38, 3042, 193, 19, 21, 2593, 14113, 4725, 800, 3726, 3726, 31, 22, 79, 845, 21, 265, 2306, 30, 63, 21, 13, 1, 1251, 14113, 4725, 1, 262, 3042, 13, 1, 15895, 1, 16877, 18, 9, 51, 1448, 25, 30...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Oracle 11G - PK index not being used on Join, resorting to full scan === I know Oracle sometimes "judges" that it's better to perform full table scan as oppose to index scan, however still being in a "learning stage", I'm just trying to get a better understanding of "when" oracle will determine the best route. For example, I have simple query: Select * FROM GLMV_JOURNAL_LOGS JLOG INNER JOIN GLMV_Transact_Details TDTL ON TDTL.TR_REF_NO = JLOG.TR_REF_NO AND TDTL.SCAT_KEY = JLOG.Scat_key AND TDTL.CASE_KEY = JLOG.CASE_KEY AND TDTL.TR_CD = JLOG.TR_CD INNER JOIN FUND_DESC FDDC ON FDDC.FD_DESC_ID = TDTL.FD_DESC_ID INNER JOIN FD_RATES FDRT ON FDRT.FDRT_KEY = TDTL.FDRT_KEY INNER JOIN BEN_TYPES BNTP ON BNTP.BNTP_KEY = FDRT.BNTP_KEY WHERE JLOG.JRNL_CD = '0' AND JLOG.SRC_CD = '2' AND JLOG.MKEY_FD_NUM <> 0 AND NVL(JLOG.TMOV_KEY, -1) > 0 AND NVL(JLOG.ORIG_SCAT_KEY, 1) = 1 AND TDTL.STAT_CD <> '4' AND NVL(TDTL.ORIG_SCAT_KEY, 1) = 1 The join on FD_RATES is joining on PK value, which I also created a corresponding index on GLMV_Transact_Details in thinking that a full table scan would be prevented, however, based on the explain plan below, it's not, even after I've performed index rebuild and gather table stats, the outcome is still the same: ![Explain Plan][1] [1]: http://i.stack.imgur.com/4pK02.jpg Now if I go into my query and add the following where clause: AND FDRT.FDRT_KEY = 100 The index will kick in of course, but I guess I'm curious as to why it's not when doing an inner join.... any tips??
0
[ 2, 15759, 547, 263, 13, 8, 13, 17244, 4348, 52, 142, 147, 27, 1865, 15, 4765, 68, 20, 503, 8313, 800, 3726, 3726, 31, 143, 15759, 1030, 13, 7, 21152, 18, 7, 30, 32, 22, 18, 574, 20, 2985, 503, 859, 8313, 28, 13659, 20, 4348, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to add a UILongPressGestureRecognizer to a UITextField? === I'm trying to add a UILongPressGestureRecognizer to a UITextfield; however, I can't seem to get it to behave properly. What I want is to override the default long press behavior (the magnifying glass and the option to "paste"), but also keep the ability to tap in the textfield in order to type in it. With the code below, it still brings up the magnifying glass and even though it enters the `textFieldLongPressed` method, it never has the correct state. Any ideas? - (void) addLongPressRecognizer: (UIView *) view { UILongPressGestureRecognizer *gestureRecognizer = [[UILongPressGestureRecognizer alloc] init]; [gestureRecognizer addTarget:self action:@selector(textFieldLongPressed:)]; gestureRecognizer.delegate = self; [view addGestureRecognizer: gestureRecognizer]; self.myGestureReconginzer = gestureRecognizer; } - (void) textFieldLongPressed:(UILongPressGestureRecognizer*)sender { if (sender.state == UIGestureRecognizerStateBegan) { [self.delegate textFieldLongPressed:self]; } } - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { if(gestureRecognizer == self.myGestureReconginzer) { //I've tried it with and without the following line // [self textFieldLongPressed:(UILongPressGestureRecognizer*) gestureRecognizer]; return YES; } else if([gestureRecognizer class] == [UILongPressGestureRecognizer class]) { return NO; } return YES; }
0
[ 2, 184, 20, 3547, 21, 13, 5661, 2701, 5890, 5133, 6418, 14673, 22007, 3592, 20, 21, 13, 5661, 11969, 1109, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 3547, 21, 13, 5661, 2701, 5890, 5133, 6418, 14673, 22007, 3592, 20, 21, 13, 5661,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to access data of a d3 SVG Element === So I am trying to make my own version of this gorgeous visualization that d3 has done: http://mbostock.github.com/d3/talk/20111116/bundle.html All I am doing is basically moving the entire chart to the left, and then trying to display the different relationships on right, so every time you hover over a name on the left, not only do you see the different types of connections change colors on the chart, you also see the names of these connections on the right. The problem I am having is accessing the actual names of the connections. I am new to javascript and even newer to d3, and am having problems understanding how to access the actual names of these SVG elements Thus far I am doing it just in the console.log() by using two lines of code: var targetTest = d3.selectAll("path.link.target-" + d.key); console.log(targetTest); In the console this will give me a log of all the SVG objects I want, but it gives me the full information for every one of the elements. Something like this: 0: SVGPathElement __data__: Object animatedNormalizedPathSegList: null animatedPathSegList: SVGPathSegList attributes: NamedNodeMap baseURI: "http://localhost/mbostock-d3- 544addb/examples/bundle2/bundle.html" childElementCount: 0 childNodes: NodeList[0] className: SVGAnimatedString clientHeight: 0 clientLeft: 0 clientTop: 0 clientWidth: 0 dataset: DOMStringMap externalResourcesRequired: SVGAnimatedBoolean farthestViewportElement: SVGSVGElement firstChild: null firstElementChild: null id: "" lastChild: null lastElementChild: null localName: "path" namespaceURI: "http://www.w3.org/2000/svg" nearestViewportElement: SVGSVGElement nextElementSibling: SVGPathElement nextSibling: SVGPathElement nodeName: "path" nodeType: 1 nodeValue: null normalizedPathSegList: null offsetHeight: 0 __proto__: SVGPathElement length: 1 parentNode: HTMLDocument __proto__: Array[0] The part of the data I am trying to access is within the __data__ object, which contains three more objects. source: Object target: Object __proto__: Object within the source object, (which is what I am trying to access) there is a field named key, and this is the field I want to access depth: 4 imports: Array[9] key: "Interpolator" name: "flare.animate.interpolate.Interpolator" parent: Object size: 8746 x: 40.62256809338521 y: 180 Basically I want to call a document.write, or similar $(#id).text() on this key, but I only seem to be able to access one element at a time, AKA I am using var target = d3.selectAll("path.link.target-" + d.key); var source = d3.selectAll("path.link.source-" + d.key); var imports = source.property("__data__").target.key; var exports = target.property("__data__").source.key; but each of these will only give me one name, rather then a full list. AKA when I hover over an element, even if it has multiple "imports" or "exports" the console.log(imports) will only give me 1 name at a time, even though I used selectAll. Any help would be much appreciated! I'm sorry if the question is a bit convoluted, I tried to be as specific as possible, since it is a very specific question, but I may have gone into to much detail... if that is possible. Anyway thanks before hand! Isaac
0
[ 2, 184, 20, 1381, 1054, 16, 21, 13, 43, 240, 13, 18, 22955, 4520, 800, 3726, 3726, 86, 31, 589, 749, 20, 233, 51, 258, 615, 16, 48, 10048, 28873, 30, 13, 43, 240, 63, 677, 45, 7775, 6903, 12536, 7576, 9, 10404, 20926, 9, 960, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
saving on intervals of time === so basically my problem is that i want to save things on certain intervals of time. maybe save an image every 30s. the problem is i dont know how to do this. is there a function or something in php or html that can keep track of time so that i can save things every 30s or so. also since my file is a .tpl file, i am open to html, php and js options. i have the saving thing working properly, but right now i just want to save during certain intervals of time. my saving function is in js, so it would be nice if your answer had a certain way for me to call this js function.
0
[ 2, 7599, 27, 15899, 16, 85, 800, 3726, 3726, 86, 11374, 51, 1448, 25, 30, 31, 259, 20, 2079, 564, 27, 1200, 15899, 16, 85, 9, 913, 2079, 40, 1961, 352, 712, 18, 9, 14, 1448, 25, 31, 1049, 143, 184, 20, 107, 48, 9, 25, 80, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
fields for iamages don't displays in active admin form === gem "formtastic", "~> 2.1.1" gem "activeadmin", "~> 0.4.2" gem "paperclip" fields for photos don't displays in active admin form app/views/admin/products/_form.html.erb ,but the same form in app/views/products/_form.html.erb works correctly in product's views > app/admin/products.erb ---------- ` ActiveAdmin.register Product do form :partial => "form" end` app/views/admin/products/_form.html.erb ---------- <%= semantic_form_for [:admin , @product ], :html => { :multipart => true } do |f| %> <%= f.semantic_errors :name , :price , :description, :category_id %> <%= f.inputs :new_product do%> <%= f.input :name %> <%= f.input :price %> <%= f.input :description %> <%= f.input :category_id , :as => :select , :collection => Hash[Category.all.map{|c| [c.name, c.id]}] %> <% end %> <%= f.inputs "Product images" do %> <%= f.fields_for :prod_images do |p| %> <%= p.input :photo, :as => :file, :label => "Image",:hint => p.template.image_tag(p.object.photo.url(:thumb)) %> <%= p.input :_destroy, :as=>:boolean, :required => false, :label => 'Remove image' ,:hint => p.object.new_record? ? p.template.image_tag(p.object.photo.url(:thumb)) : p.template.image_tag(p.object.photo.url(:thumb)) %> <%end%> <% end %> <%= f.actions do %> <%= f.action :submit , :as => :button %> <% end %> <% end %>
0
[ 2, 2861, 26, 31, 765, 14465, 221, 22, 38, 9412, 19, 1348, 21, 43, 2160, 505, 800, 3726, 3726, 8551, 13, 7, 4190, 38, 9428, 7, 15, 13, 7, 1, 172, 9, 165, 9, 165, 7, 8551, 13, 7, 7889, 1283, 2160, 7, 15, 13, 7, 1, 713, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customizing Ribbon in Lead entity dynamic CRM 2011 === In lead form ribbon, I added two buttons with the help of VisualRibbonEditor. After that I deleted with the help of VisualRibbonEditor. But when I see RibbonDiffXML, still both buttons exists even though they are not visbile in Ribbon. Here are my questions 1. How can I remove those two button entries? Do I have to create a new solution? 2. I want to add a new button and customise ConvertLead functionality. Without VisualRibbonEditor how can I achieve this manually i.e., with the help of solution file.
0
[ 2, 5816, 3335, 9162, 19, 672, 9252, 7782, 6186, 79, 542, 800, 3726, 3726, 19, 672, 505, 9162, 15, 31, 905, 81, 12861, 29, 14, 448, 16, 3458, 17980, 5566, 13401, 9, 75, 30, 31, 19584, 29, 14, 448, 16, 3458, 17980, 5566, 13401, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Could not load file or assembly: The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key === I use in my project ASP.NET assemblies building from source code. My project builded successful. But when I start in debug mode, I get exception Could not load file or assembly 'System.Net.Http.Formatting' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
0
[ 2, 110, 52, 6305, 3893, 54, 1475, 45, 14, 1475, 123, 57, 74, 29129, 43, 29, 15, 54, 32, 23, 7255, 908, 47, 52, 2337, 908, 29, 14, 4456, 932, 1246, 800, 3726, 3726, 31, 275, 19, 51, 669, 28, 306, 9, 2328, 21066, 353, 37, 1267...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
xpath only grabbing hmtl commment within tags === I have a php script that logs into a website, and then I'm trying to run an xpath query to grab a certain tag. If I save the page locally and run the xpath, then everything works out great; however, when I log into the site and run the xpath, it only returns the html comment at the bottom of the tag. So - if I have: <html> <body> something here <!--comment here--> </body> </html> and I point my xpath query at //html/body, it will only return "comment here" and nothing else. I'm VERY confused and have never seen anything like this - any ideas?
0
[ 2, 993, 8353, 104, 9910, 13, 7015, 7786, 11951, 1130, 363, 3383, 18, 800, 3726, 3726, 31, 57, 21, 13, 26120, 3884, 30, 18893, 77, 21, 2271, 15, 17, 94, 31, 22, 79, 749, 20, 485, 40, 993, 8353, 25597, 20, 4931, 21, 1200, 3383, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
bind and Display dictionary with knockoutjs === i work with knockout, i have an observablearray (mappedCompaignByInterest) in my viewmodel that contains array of object, each object is like dictionary, it contain key that is string and the value that is an array of object(Compaign). please how can i bind this object with table on knockoutjs .
0
[ 2, 10193, 17, 3042, 9186, 29, 11676, 728, 18, 800, 3726, 3726, 31, 170, 29, 11676, 15, 31, 57, 40, 5122, 10321, 579, 8576, 93, 13, 5, 79, 16664, 18415, 9693, 779, 16208, 6, 19, 51, 1418, 13998, 30, 1588, 7718, 16, 3095, 15, 206,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MooTools Slider doesn't work when adding to DOM after creation === I'm having a lot of problems with getting the MooTools Slider (http://mootools.net/docs/more/Drag/Slider) to work. After a lot of debugging, it seems that the problem lies in the fact that i create the slider (by doing new Slider(sliderElement, knobElement)) before adding it to the dom. When i create the slider afterwards it works fine, but doing it this forces me to create the sliders in a *very* illogical location in my code What i'd like to do is this: createSlider: function() { var sliderContainer = new Element('div'); var sliderTrack = new Element('div', {class: 'slider_track'}); var sliderKnob = new Element('div', {class: 'slider_knob'}); sliderTrack.grab(sliderKnob); new Slider(sliderTrack, sliderKnob); slidersContainer.grab(sliderTrack); return sliderContainer; } Is there any way to get it to work like this?
0
[ 2, 13, 8765, 20799, 18, 3295, 106, 1437, 22, 38, 170, 76, 4721, 20, 11859, 75, 2502, 800, 3726, 3726, 31, 22, 79, 452, 21, 865, 16, 1716, 29, 1017, 14, 13, 8765, 20799, 18, 3295, 106, 13, 5, 21127, 6903, 8765, 20799, 18, 9, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PyQT4 change qDateTimeEdit time value? === got stuck on this part of my program.. and it seems i cant find a decent example of how to do this.. i got a QDateTimeEdit object i already set its displaying value to what my current system time is using self.ui.dateTimeEdit.setDate(QDate.currentDate()) its output is for example is **7/16/2012 12:00:00 AM** Now my problem is.. i want to set **12:00:00 AM** to **11:59:59 PM** how can i do this please? thanks to anyone willing to spend time on my question.
0
[ 2, 7103, 1251, 38, 300, 753, 2593, 8209, 891, 69, 242, 85, 1923, 60, 800, 3726, 3726, 330, 4549, 27, 48, 141, 16, 51, 625, 9, 9, 17, 32, 2206, 31, 2973, 477, 21, 12238, 823, 16, 184, 20, 107, 48, 9, 9, 31, 330, 21, 2593, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Id is appedned while using richfaces validation === i am using richfaces validation, it is working fine but textfiled's id is also appened in the validation message as I am using portal so in id it is appeneding some portal text as well. excample : viewns_Z7_4IH2H4S0IOTRE0I3H34LO110O3_:ns_Z7_4IH2H4S0IOTRE0I3H34LO110O3_j_id255337199_f3822a1:field1: size must be between 3 and 12 here field1 is textfield's id. but i dont want id that is appened in validation message.
0
[ 2, 4924, 25, 13, 16664, 3725, 133, 568, 2042, 6413, 18, 27999, 800, 3726, 3726, 31, 589, 568, 2042, 6413, 18, 27999, 15, 32, 25, 638, 1123, 47, 1854, 16877, 43, 22, 18, 4924, 25, 67, 13, 22358, 69, 19, 14, 27999, 2802, 28, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to show the content of an url on an extension's popup? === I'm trying to make a Chrome extension that gets the current page's URL and uses it to create and show a QR code that links to it with the below Google API. *This is my popup.js* chrome.tabs.getSelected(null,function(tab) { var tablink = tab.url; }); document.write('https://chart.googleapis.com/chart?chs=100x100&cht=qr&chl=' + tablink); *and this is my manifest.json* { "name": "Qrit", "version": "1.0", "manifest_version": 2, "description": "Instantly creates a QR Code that links to the current page.", "browser_action": { "default_icon": "icon.png", "default_popup": "popup.html" }, "permissions": [ "tabs" ] } The problem is that the popup is simply blank. I know almost nothing about Javascript, nor Json.
0
[ 2, 184, 20, 298, 14, 2331, 16, 40, 287, 6362, 27, 40, 3896, 22, 18, 1675, 576, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 233, 21, 13, 12985, 3896, 30, 3049, 14, 866, 2478, 22, 18, 287, 6362, 17, 2027, 32, 20, 1600, 17, 298, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can i write html code in eclipse? === I have to create a html page and it should be capable of taking contents like images,videos, text from user input and later user should be notified about all updates through notifications in android, So i want to create html page in eclipse ,is that possible?
1
[ 2, 92, 31, 2757, 13, 15895, 1797, 19, 11652, 60, 800, 3726, 3726, 31, 57, 20, 1600, 21, 13, 15895, 2478, 17, 32, 378, 44, 3868, 16, 741, 8478, 101, 3502, 15, 14785, 18, 15, 1854, 37, 4155, 6367, 17, 138, 4155, 378, 44, 22904, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to Impliment WCF Rest full Webservices In Iphone Application === I need help To implementation of WFC RestFull Web services Post and get method I done Lots of RND but can't understand How to do... Please Anyone guide me step by step How to impliment... MY webservice: http://111.11.111.111:8443/ma/xyz parameter is: <OverseasPostalInfoDetailsRequest xmlns="http://xyz.com/a/ns"> <Country>xyz</Country> <Weight>100</Weight> <DeliveryServiceName>xyz</DeliveryServiceName> </OverseasPostalInfoDetailsRequest> i dont know How to impliment this please help
0
[ 2, 184, 20, 5420, 1210, 1130, 11801, 410, 760, 503, 2741, 11449, 18, 19, 21024, 3010, 800, 3726, 3726, 31, 376, 448, 20, 6123, 16, 619, 7061, 760, 13727, 2741, 687, 678, 17, 164, 2109, 31, 677, 7503, 16, 761, 706, 47, 92, 22, 38...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I refresh the foreignkey_set after a destructive operation in Django? === I realized that the object_set on a model doesn't update if I delete items through `filter().delete()` (which is okay) however I'd like to update the `_set` after deletion so that this passes: def test_prefetch(self): game = Game.objects.prefetch_related('bubble_set').get() game.fill_board() self.assertEqual(game.bubble_set.count(), game.width * game.height) game.bubble_set.filter(x=5).delete() # Fails self.assertNotEqual(game.bubble_set.count(), game.width * game.height) game = Game.objects.prefetch_related('bubble_set').get()
0
[ 2, 184, 107, 31, 24905, 14, 1228, 4237, 1, 3554, 75, 21, 19439, 1453, 19, 3857, 14541, 60, 800, 3726, 3726, 31, 1896, 30, 14, 3095, 1, 3554, 27, 21, 1061, 1437, 22, 38, 11100, 100, 31, 27448, 3755, 120, 13, 1, 11924, 815, 5, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
navigationController setup pop transition style === Is it possible to change popToViewController transition style for UINavigationController? I need same style as for pushViewController method?(I mean from right to left style(pushViewController), not left to right(popToViewController by default)).
0
[ 2, 8368, 12898, 1252, 18161, 1675, 4513, 1034, 800, 3726, 3726, 25, 32, 938, 20, 753, 1675, 262, 4725, 12898, 1252, 4513, 1034, 26, 287, 1673, 13227, 857, 12898, 1252, 60, 31, 376, 205, 1034, 28, 26, 3250, 4725, 12898, 1252, 2109, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Fedex Api Rate Calculator === Parameters to be passed to the Fedex API . New Fedex APi rate calculator not working getting Authentiction error 1000 "Authentication Failed" error
0
[ 2, 6068, 1706, 21, 2159, 1684, 28539, 800, 3726, 3726, 12905, 20, 44, 1100, 20, 14, 6068, 1706, 21, 2159, 13, 9, 78, 6068, 1706, 21, 2159, 1684, 28539, 52, 638, 1017, 14351, 3309, 7019, 6150, 13, 7, 1346, 2504, 1786, 857, 1702, 7,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Sql server datetime field issue === My personal computer is windows7 (language turkish) and installed Sql server 2008. When I created a new database, the database language is Turkish_CI_AS And I have a server windows 2003 server (language english) and installed sql server 2008.I set the Regional and Language Options as Turkish. I am creating a database and selecting colection Turkish_CI_AS But when I insert a record to server, an error occuring. The date format is invalid.
0
[ 2, 4444, 255, 8128, 1231, 891, 575, 1513, 800, 3726, 3726, 51, 1319, 1428, 25, 1936, 465, 13, 5, 7020, 4170, 6, 17, 4066, 4444, 255, 8128, 570, 9, 76, 31, 679, 21, 78, 6018, 15, 14, 6018, 816, 25, 4170, 1, 1892, 1, 472, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
EasyMock when we have a call to db on the test class === I am testing a class let say MyClass with JUnit. I am using easymock to isolate the need for db. It works fine. So if there is a call to a model object I just mock that object. E.g. if I have public void method(Project project) { project.getName(); ..} inside MyClass I just use mockedProject. Then I say MyClass.method(mockedProject); But what if I have this.getName() inside MyClass. In that case, since I want the real object for the class which I am testing (MyClass) I cannot mock MyClass object. So I cannot define a return value for MyClass object as it is a real object. Please have in mind that getName() would go throw the db which I don't want it to go. What should I do in this case when I have this.method() and where the method works with db. I cannot mock this object which I am testing. Thanks.
0
[ 2, 2010, 79, 5668, 76, 95, 57, 21, 645, 20, 13, 9007, 27, 14, 1289, 718, 800, 3726, 3726, 31, 589, 4431, 21, 718, 408, 395, 51, 1898, 29, 7446, 242, 9, 31, 589, 568, 2010, 79, 5668, 20, 25068, 14, 376, 26, 13, 9007, 9, 32, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
bad position with interval for markers === i can display all markers from a request but they point with a little gap into my map, for instance, new york is pointed near Quebec...(isn't horrific? ;) if i zoom into the map all markers move close the right position.. Can anyone konw ho to fix it? tanx <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.1&sensor=true"></script> <script type="text/javascript"> //<![CDATA[ var geocoder; var map; var timeout = 600; var address_position = 0; var address = [ <?php $_list=""; $_unicite=array(); foreach($search_data as $k => $item) { $_address=trim($item->meta_value); if(!empty($_address)) { if(!in_array($_address,$_unicite)){ $_unicite[$item->post_id]=$_address; $_list.='"'.$_address.'",'; } } } if(!empty($_list)) { $_list=substr($_list,0,abs(strlen($_list)-1)); } echo $_list; ?> ]; var link = [ <?php $_list2=""; $_unicite2=array(); foreach($search_data as $k => $item) { $_link=trim($item->post_id); if(!empty($_link)) { if(!in_array($_link,$_unicite2)){ $_unicite2[$item->post_id]=$_link; $_list2.='"'.$_link.'",'; } } } if(!empty($_list2)) { $_list2=substr($_list2,0,abs(strlen($_list2)-1)); } echo $_list2; ?> ]; var title = [ <?php $_list3=""; $_unicite3=array(); foreach($search_data as $k => $item) { $_title=trim($item->post_title); if(!empty($_title)) { if(!in_array($_title,$_unicite2)){ $_unicite2[$item->post_id]=$_title; $_list3.='"'.$_title.'",'; } } } if(!empty($_list3)) { $_list3=substr($_list3,0,abs(strlen($_list3)-1)); } echo $_list3; ?> ]; var image = new google.maps.MarkerImage( 'http://www.bookyourparis.com/images-site/beachflag.png', new google.maps.Size(28,54), new google.maps.Point(0,0), new google.maps.Point(14,54) ); function addMarker(position) { geocoder.geocode({'address': address[position]}, function(results, status) { address_position++; if (address_position < address.length) { setTimeout(function() { addMarker(address_position); }, (timeout)); } if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) { setTimeout(function() { addMarker(position); }, (timeout * 3)); } /** if (address_position < address.length) { if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) { setTimeout(function() { addMarker(position); }, (timeout * 3)); } else { setTimeout(function() { addMarker(address_position); }, (timeout)); } } /**/ else if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ position: results[0].geometry.location, map: map, title:address[position], icon: image, }); var contentString = '<div id="content_bulle"><div id="bodyContent_bulle" style="margin-top:5px;">'+ '<h1 style="font-size:1.5em">'+title[position]+ '</h1><h2 style="font-size:1.2em">'+results[0].formatted_address+ '</h2><p style="color:#AF1A40"><a target="_blank" href="?p='+link[position]+'">View</a></p>'+ '</div></div>'; var infowindow = new google.maps.InfoWindow({ content: contentString, maxHeight: 100 }); google.maps.event.addListener(marker, 'click', function() { infowindow.open(map,marker); }); } }); } function codeaddress() { geocoder = new google.maps.Geocoder(); //var latlng = new google.maps.LatLng(-34.397, 150.644); var myOptions = { zoom: 2, navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, mapTypeId: google.maps.MapTypeId.HYBRID, } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); addMarker(address_position); } function centerMap() { map.setCenter(markers[markers.length-1].getPosition()); } jQuery(window).load( function(){ codeaddress(); }); //]]> </script> <div id="map_canvas" style="width: 940px; height: 420px;border:1px solid #999"></div>
0
[ 2, 896, 649, 29, 14422, 26, 19482, 800, 3726, 3726, 31, 92, 3042, 65, 19482, 37, 21, 3772, 47, 59, 454, 29, 21, 265, 4127, 77, 51, 2942, 15, 26, 4851, 15, 78, 305, 25, 2489, 424, 4107, 9, 9, 9, 5, 19591, 22, 38, 25142, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
check condition in xslt === Below is the input XML (Little Big) sorry for the bigger input XML and as well as output xml <tutorial> <lessons> <lesson> chapter unit 1 page </lesson> <lesson> chapter unit 10~ page </lesson> <lesson> chapter unit page </lesson> <lesson> note lesson </lesson> <lessons1> <lesson> chapter unit 1 page </lesson> <lesson> description page </lesson> <lesson> chapter unit page </lesson> </lessons1> </lessons> </tutorial> Below is my Output Xml <?xml version="1.0" encoding="ISO-8859-1"?> <Geography> <historical> <social> <toc1> <toc> <chapter>chapter</chapter> <unit>unit 1</unit> <pages>page</pages> </toc> <toc> <chapter>chapter</chapter> <unit>unit 10</unit> <pages>page</pages> </toc> <toc> <chapter>chapter</chapter> <unit>unit 10</unit> <pages>page</pages> </toc> <toc> <sample> <original>Note Lesson</orginal> </sample> </toc> </toc1> <toc2> <toc> <chapter>chapter</chapter> <unit>unit 1</unit> <pages>page</pages> </toc> <toc> <sample> <original>description page</orginal> </sample> </toc> <toc> <chapter>chapter</chapter> <unit>unit 10</unit> <pages>page</pages> </toc> </toc2> </social> </historical> </Geography> It's quiet big output XML file sorry for that. In unit if i have unit 1 in output it will displayed as unit 1 but for example if i have unit10~ it will displayed as unit 10 the ~ has to removed if there is no value in by default it has to displayed unit 10. Please help me and guide me with the help of XSLT. Regards Karthic
0
[ 2, 2631, 2874, 19, 993, 18, 255, 38, 800, 3726, 3726, 1021, 25, 14, 6367, 23504, 13, 5, 9113, 580, 6, 1875, 26, 14, 6197, 6367, 23504, 17, 28, 134, 28, 5196, 23504, 13, 1, 2473, 9819, 192, 1, 13, 1, 923, 4710, 1, 13, 1, 923,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Prestashop: show products under a single manufacturer === I have a Prestashop project right now. In my cms.tpl, I added a code that once this specific page is clicked, what you can see on the page are all the manufacturers images. Now, once you click on the "click here" button of the image, all products under the manufacturer will show. This is how my code looks like so far: <div class="storeset5"> <a href="javascript:unhide('product1');"><img src="{$content_dir}themes/prestashop/images/click-here.jpg" alt="" style="padding-top:95px; padding-left:90px;" /></a></div> <div id="product1" class="hidden"> <hr /><br/> <p>Products of manufacturer 1 here</p> </div> I'm stuck on how to show all products of that specific manufacturer. Can anybody give me an idea how to do this? Thanks.
0
[ 2, 26481, 472, 5347, 45, 298, 1985, 131, 21, 345, 7094, 800, 3726, 3726, 31, 57, 21, 26481, 472, 5347, 669, 193, 130, 9, 19, 51, 2390, 18, 9, 38, 5727, 15, 31, 905, 21, 1797, 30, 382, 48, 1903, 2478, 25, 15802, 15, 98, 42, 9...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python repeating CSV file === I'm attempting to load numerical data from CSV files in order to loop through the calculated data of each stock(file) separately and determine if the calculated value is greater than a specific number (731 in this case). However, the method I am using seems to make Python repeat the list as well as add quotation marks around the numbers ('500'), as an example, making them strings. Unfortunately, I think the final "if" statement can't handle this and as a result it doesn't seem to function appropriately. I'm not sure what's going on and why Python what I need to do to get this code running properly. import csv stocks = ['JPM','PG','GOOG','KO'] for stock in stocks: Data = open("%sMin.csv" % (stock), 'r') stockdata = [] for row in Data: stock.extend(map(float, row.strip().split(','))) stockdata.append(row.strip().split(',')[0]) if any(x > 731 for x in stockdata): print "%s Minimum" % (stock)
0
[ 2, 20059, 17389, 272, 18, 710, 3893, 800, 3726, 3726, 31, 22, 79, 6314, 20, 6305, 16010, 1054, 37, 272, 18, 710, 6488, 19, 389, 20, 5293, 120, 14, 10785, 1054, 16, 206, 2070, 5, 16877, 6, 10714, 17, 3746, 100, 14, 10785, 1923, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a Robocode like game for C++ === I have learnt java for a year.Now that I'm learning c++ from the start,and the next step i will start with game developing.Where can i get game framworks just like robocode or tutorials of learning C++ with a programming game?
0
[ 2, 25, 80, 21, 3830, 111, 9375, 101, 250, 26, 272, 20512, 800, 3726, 3726, 31, 57, 2484, 38, 8247, 26, 21, 159, 9, 1387, 30, 31, 22, 79, 2477, 272, 20512, 37, 14, 799, 15, 290, 14, 328, 1424, 31, 129, 799, 29, 250, 3561, 9, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MVC Razor Hidden input and passing values === I am pretty sure I am doing the wrong thing here. But over the last 2 months we have been developing a web app using MVC and Razor and we never even taught of using the form element. Now so much has been done, with master pages and sub pages that it will mean restructuring most of our code in order to use form element and we would have multiple form elements on a page. That aside, in Asp.Net if I wanted to access any control in C# code behind I could just give it an ID="SomeID" and a RUNAT="SERVER". Then in my code behind I could set its value and properties. When I do this in Razor using a line like: <input id="hiddenPostBack" runat="server" type="hidden" /> Why cant I access it in the controller. I want to detect postback and set the value to false if it is the first time the page loads, and if not, then set the value to true. Then based on this, I will read it either server side or client side and do something. My real question is, how do I "do something" both server side and client side given I dont have a form element. I was given to beleive that if I wanted to pass values from client to server and back that the easiest way to do this is with a hidden input. But I am just not getting how to accomplish this with MVC3 and razor. Thanks in advance for your help.
0
[ 2, 307, 8990, 14282, 3689, 6367, 17, 2848, 4070, 800, 3726, 3726, 31, 589, 1772, 562, 31, 589, 845, 14, 1389, 584, 235, 9, 47, 84, 14, 236, 172, 818, 95, 57, 74, 3561, 21, 2741, 4865, 568, 307, 8990, 17, 14282, 17, 95, 243, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I run a command at read time for a named pipe in linux? === I'd like to have a program open that will write to a named pipe, but it doesn't write until someone actually reads from the named pipe. Is this achievable? How do I know when the pipe is read from?
0
[ 2, 184, 92, 31, 485, 21, 1202, 35, 1302, 85, 26, 21, 377, 7642, 19, 13024, 60, 800, 3726, 3726, 31, 22, 43, 101, 20, 57, 21, 625, 368, 30, 129, 2757, 20, 21, 377, 7642, 15, 47, 32, 1437, 22, 38, 2757, 163, 737, 1121, 11137, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
copy attribute to closing tag === I have a huge xml file which I want to import into Excel. As part of this, I need the opening and closing tags to match. this is a snippet of what I am starting with: <FIELD NAME="language">en</FIELD> <FIELD NAME="languages"></FIELD> <FIELD NAME="charset"></FIELD> <FIELD NAME="urls"></FIELD> etc I need it to transform to this <"language">en</"language"> <"languages"></"languages"> <"charset"></"charset"> <"urls"></"urls"> There is sometimes a number, sometimes a date, sometimes a URL and some times a ton of text in between the tags. can anyone suggest an approach? thanks
0
[ 2, 4344, 35, 14755, 20, 4239, 3383, 800, 3726, 3726, 31, 57, 21, 2329, 23504, 3893, 56, 31, 259, 20, 9010, 77, 20700, 9, 28, 141, 16, 48, 15, 31, 376, 14, 1214, 17, 4239, 3383, 18, 20, 730, 9, 48, 25, 21, 13, 29061, 16, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
if and else are both true === Sorry for this crazy question but it seems to be odd! I have a code: if(isset($_GET['tablename'])){ $tablename=$_GET['tablename']; var_dump($tablename); echo 'Table is set <br/>'; if($tablename="product"){ echo 'Table is product <br/>'; }; if($tablename="demanded"){ echo 'Table is demanded <br/>'; }; }; and this is what I see on display: > string 'demanded' (length=8) > Table is set > Table is product > Table is demanded please help I want to run sub queries depending on table value (product or demanded)
0
[ 2, 100, 17, 962, 50, 156, 1151, 800, 3726, 3726, 1875, 26, 48, 3328, 1301, 47, 32, 2206, 20, 44, 4210, 187, 31, 57, 21, 1797, 45, 100, 5, 11001, 38, 5, 4403, 1, 3060, 2558, 22, 5924, 7259, 22, 500, 6, 6, 1, 5579, 5924, 7259,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Qt smart pointer equivalent of boost::shared_array? === While there exists an equivalent of `boost::shared_ptr` (`QSharedPointer`) I wasn't able to find something that resembles `boost::shared_array`. Of course I could use something similar to QSharedPointer<const std::vector<T> > shared_vector_ptr(new std::vector<T>( reinterpret_cast<T*>(pBuffer), reinterpret_cast<T*>(pBuffer+length) )); but I would like to know if there exists a **native** Qt solution which provides `T& operator[](size_t)` and uses `delete[]` instead of `delete`. I'm reluctant to use boost in this project since the target machine couldn't have boost installed and the project gets distributed by source. Note: I know I can specify a deleter by using `QSharedPointer::QSharedPointer ( T * ptr, Deleter deleter )`, however I dislike approach since the compiler doesn't force you to specify a deleter, which would result in a `new []` allocated block deleted by `delete`.
0
[ 2, 2593, 38, 3978, 454, 106, 4602, 16, 10419, 45, 45, 16608, 43, 1, 8576, 93, 60, 800, 3726, 3726, 133, 80, 5636, 40, 4602, 16, 13, 1, 10858, 384, 45, 45, 16608, 43, 1, 4417, 139, 1, 13, 5, 1, 1251, 16608, 43, 3132, 106, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to return from perl === I have a HTML file, which generates a web page. Users can enter some comments on webgpage. To save the comments i am calling a perl script, using JQuery/ AJAX. which will add one row in DB. Inside perl script after adding the record, i am again fetching the same record. Now i want to display that record in my page without refreshing the page. (i know we can do using append in jquery) My question is how to return that record from perl to HTML page, including HTML tags and all. This is the portion where new records will be added. <span class="requester"> <span>**message**</span> </br> <i> - **username** </i> <button class="deleteResponse" id="id"> delete </button> <hr> </span> Message and username is the items i will be getting from MYSQL quesry.\ Any help will be appreciated. Thanks sapna
0
[ 2, 184, 20, 788, 37, 416, 255, 800, 3726, 3726, 31, 57, 21, 13, 15895, 3893, 15, 56, 7920, 18, 21, 2741, 2478, 9, 3878, 92, 2830, 109, 7534, 27, 2741, 263, 6486, 9, 20, 2079, 14, 7534, 31, 589, 2555, 21, 416, 255, 3884, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Positioning Popup GWT === How Can i position Popup at the mouse clicked position in GWT. I tried using the getX, and getY on the flextable and set the Popup to that position but that isn't working.
0
[ 2, 649, 68, 1675, 576, 14094, 38, 800, 3726, 3726, 184, 92, 31, 649, 1675, 576, 35, 14, 7567, 15802, 649, 19, 14094, 38, 9, 31, 794, 568, 14, 164, 396, 15, 17, 164, 93, 27, 14, 14409, 5924, 17, 309, 14, 1675, 576, 20, 30, 64...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Calculate the difference between timestamp === I have created registration page and when user click submit button, an activation link is sent to his email and accordingly timestamp is stored in the database. If user click that activation link, I have to check whether that link is clicked before or after 24 hours . my code :- function confirmEmail($activation_code){ $this->load->database(); $this->load->helper('date'); echo "activation link will be checked and accordingly flag will be set."; $activation_sent_timestamp=$this->db->query("SELECT activation_timestamp FROM tbl_user_registration WHERE email_verification_code='$activation_code'"); foreach($activation_sent_timestamp->result() as $res){ $activation_time_from_db=$res->activation_timestamp; } echo $activation_time_from_db."\n\r"; $now = time(); $human = unix_to_human($now); echo $human; $difference = ($human-$activation_time_from_db); if($difference < 24) { echo "correct" } else echo "Link expired"; } I am using codeigniter. How can I do this, this code isnot showing any erros but I dont know is this the right way to calculate 24 hours, I am checking but didnt get anything.please check the code.
0
[ 2, 18469, 14, 2841, 128, 436, 38, 10158, 800, 3726, 3726, 31, 57, 679, 8587, 2478, 17, 76, 4155, 10840, 12298, 5167, 15, 40, 15519, 3508, 25, 795, 20, 33, 8517, 17, 12932, 436, 38, 10158, 25, 8214, 19, 14, 6018, 9, 100, 4155, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Retrieve memory iPad information in iOS app === Is there a way to retrieve information about the memory of the ipad during running? For example, i would like to print in the console the use of memory at t instant. Thanks
0
[ 2, 11917, 1912, 31, 8240, 676, 19, 13, 7760, 4865, 800, 3726, 3726, 25, 80, 21, 161, 20, 11917, 676, 88, 14, 1912, 16, 14, 31, 8240, 112, 946, 60, 26, 823, 15, 31, 83, 101, 20, 4793, 19, 14, 8650, 14, 275, 16, 1912, 35, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Round a POSIX date (POSIXct) with base R functionality === I'm currently playing around a lot with dates and times for a package I'm building. Stumbling across this [post][1] reminded me again that it's generally not a bad idea to check out if something can be done with basic R features before turning to contrib packages. Thus, is it possible to round a date of class `POSIXct` with base R functionality? I checked methods(round) which "only" gave me [1] round.Date round.timeDate* Non-visible functions are asterisked This is what I'd like to do (Pseudo Code) ----------------------------------------- x <- as.POSIXct(Sys.time()) [1] "2012-07-04 10:33:55 CEST" round(x, atom="minute") [1] "2012-07-04 10:33:00 CEST" round(x, atom="hour") [1] "2012-07-04 10:00:00 CEST" round(x, atom="day") [1] "2012-07-04 CEST" I know this can be done with [timeDate][2], [lubridate][3] etc., but I'd like to keep package dependencies down. So before going ahead and checking out the source code of the respective packages, I thought I'd ask if someone has already done something like this. [1]: http://stackoverflow.com/questions/8333838/how-do-you-generate-a-sequence-of-the-last-day-of-the-month-over-two-years-in-r [2]: http://cran.r-project.org/web/packages/timeDate/index.html [3]: http://cran.r-project.org/web/packages/lubridate/index.html
0
[ 2, 560, 21, 2353, 6742, 1231, 13, 5, 14882, 21550, 38, 6, 29, 1000, 761, 18548, 800, 3726, 3726, 31, 22, 79, 871, 791, 140, 21, 865, 29, 4076, 17, 436, 26, 21, 6030, 31, 22, 79, 353, 9, 23034, 464, 48, 636, 6962, 500, 2558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Operaciones en Segundo Plano javame === Hola amigos tengo una gran duda tengo una App que inicia en segundo plano y al precionar el icono lanza la interfaz, el problema es que necesito hacer una operaciones en segundo plano.. como almacenar un archivo de texto, escribir sobre ese archivo y enviarlo por ftp y TCP el problema es que tengo el codigo y no se ejecuta por alguna razon no da error ni nada solo no se ejecuta... Coloque en mismo codigo en la interfaz y al presionar el icono ejecuta todo perfecto aqui les dejo el codigo para ver por que sucede esto y en que me pueden ayudar por fa URGENTEEE public static void main( String[] args ) { if( args.length > 0 && args[ 0 ].equals( "autostartup" ) ) { System.out.println ("Ejecutando sdrgundo plano .."); try { FileConnection fc = (FileConnection) Connector.open("file:///SDCard/Ejemplo.txt"); if (!fc.exists()) { fc.create(); } OutputStream os = fc.openOutputStream(); String datos=""; InputStream fis = fc.openInputStream(); int value=0; while((value=fis.read())!=-1){ System.out.print((char)value); datos=datos+(char)value; } System.out.println((char)value); PrintStream ps = new PrintStream(os); ps.println(datos+"\r"+ "\nTEXTO AL ALMACENAR EN ARCHIVO SEGUNDO PLANO\n"); ps.close(); fis.close(); fc.close(); } catch (IOException ex) { ex.printStackTrace(); } } else { System.out.println ("Ejecutando CON INTERFAZ .."); try { FileConnection fc = (FileConnection) Connector.open("file:///SDCard/Ejemplo.txt"); if (!fc.exists()) { fc.create(); } OutputStream os = fc.openOutputStream(); String datos=""; InputStream fis = fc.openInputStream(); int value=0; while((value=fis.read())!=-1){ System.out.print((char)value); datos=datos+(char)value; } System.out.println((char)value); PrintStream ps = new PrintStream(os); ps.println(datos+"\r"+ "\nTEXTO AL ALMACENAR EN ARCHIVO ICONO\n"); ps.close(); fis.close(); fc.close(); } catch (IOException ex) { ex.printStackTrace(); } new CPANAXCdr().showGui(); }
3
[ 2, 1877, 23783, 1957, 1353, 4570, 537, 944, 111, 8247, 790, 800, 3726, 3726, 5173, 58, 589, 10215, 18, 652, 839, 13, 4140, 5659, 1052, 593, 652, 839, 13, 4140, 4865, 9386, 19, 15269, 1957, 1353, 4570, 537, 944, 111, 13, 93, 493, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can't connect after changing routers MAC address === I change my routers mac address regularly to change IPs so I can log into my different paypal accounts with worrying about getting them linked. My IP is dynamic, but has a long lease so doesn't change every time I reset modem. I found out I could log into my routers admin panel and change the mac address there, and then after resetting the router and modem, the IP would be different. But now when I change my mac address, and reset modem/router, the computer connects, but I can only access the routers default gateway, not the internet. I can now only access it through the mac addresses I've used in the past. I just cloned my mac address the first time, and then changed the last digits slightly to get a different IP, but this doesn't work now. I'm with Virgin Media. Anybody know what the problem is?
2
[ 2, 92, 22, 38, 6379, 75, 4226, 858, 1224, 1572, 3218, 800, 3726, 3726, 31, 753, 51, 858, 1224, 1572, 3218, 4217, 20, 753, 31, 1919, 86, 31, 92, 6738, 77, 51, 421, 1372, 6720, 5310, 29, 17731, 88, 1017, 105, 4727, 9, 51, 15735, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to restore a default HTML element once the user leaves a page in Jquery Mobile? === I have a page with a placeholder content block. Once the page is loaded I'm replacing the default block with some AJAX content, which is either loaded by default or by user interaction. I'm replacing the loaded content like so: // inside AJAX success handler // data is JSON string sent via AJAX // target is the element containing my default content var makeUp = data; target.addClass('fade out').html( makeUp ).trigger('create') .removeClass('fade out').addClass('fade in') This works nicely and I can replace the content whenever the user does something on the page. However if the user leaves the page and comes back when it's still in the DOM, I want to show the default content. Right now, the last AJAX content is visible. So I'm looking at binding to page hide and restoring the default content from somewhere. **Question:** What's the best way to store the default content on the page. It's not much ( 1 controlgroup, 2 text blocks), but I'm reluctant to add this to the wrapper container as a data-default-string. There must be a better way. Thanks!
0
[ 2, 184, 20, 8454, 21, 12838, 13, 15895, 4520, 382, 14, 4155, 2084, 21, 2478, 19, 487, 8190, 93, 3241, 60, 800, 3726, 3726, 31, 57, 21, 2478, 29, 21, 209, 12427, 2331, 1921, 9, 382, 14, 2478, 25, 8572, 31, 22, 79, 5496, 14, 128...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customizing "Build Executor Status" of Jenkins === We have a big RAILS project and we are following Github flow to drive our development process. I looked through all the available plugins but could not find anything that customizes the "Build executor status" part of the jenkins front page. I wanted to put the name of the git branch instead of job name and executor number since the former makes more sense in our case. Has anybody done this ?
0
[ 2, 5816, 3335, 13, 7, 29361, 1396, 17194, 2153, 1782, 7, 16, 11420, 800, 3726, 3726, 95, 57, 21, 580, 2240, 18, 669, 17, 95, 50, 249, 13, 10404, 20926, 3312, 20, 1493, 318, 522, 953, 9, 31, 292, 120, 65, 14, 904, 10922, 108, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
c++ use naked function === I am trying to learn ASM, and want to try a few things combined with C++. The ASM part is done in a naked function. But whenever I call the function (empty) the application crashes in the next function. What should I do in the naked function to make it work, do I need to pop esp or something? An example could be helpfull. _declspec(naked) void asmfunc() { _asm { } } int _tmain(int argc, _TCHAR* argv[]) { i = 1; asmfunc(); cout << i << endl; // <-- crash system("pause"); return 0; }
0
[ 2, 272, 20512, 275, 5426, 1990, 800, 3726, 3726, 31, 589, 749, 20, 2484, 28, 79, 15, 17, 259, 20, 1131, 21, 310, 564, 2461, 29, 272, 20512, 9, 14, 28, 79, 141, 25, 677, 19, 21, 5426, 1990, 9, 47, 6634, 31, 645, 14, 1990, 13,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Adjusting line-height for different ems in stacked text? === Bit of a newbie, and trying to figure out something that's probably quite simple: I'm trying to "stack" some text, but have one small word inserted among the big words, like so: THIS IS AN important SENTENCE So I have the HTML laid out with the main text in its own class, with the font size at 8em, and a span in the middle for the smaller word. THIS<br>IS AN<br><span class="important">important</span><br>SENTENCE<br> In the CSS, I've set up a class for "important": .important { font-size: 0.5em; line-height: 0.5em; } ...and it's there, and looks great, BUT the line-height doesn't seem to take. The word "important" is 0.5em in size, but the line-height is just as tall as the rest of the words, resulting in a giant space after IS AN and before "important". I've tried with the br both inside and outside the span, on both sides of "important", like THIS<br>IS AN<span class="important"><br>important<br></span>SENTENCE<br> ...but I just can't seem to get the line-height to take. What am I doing wrong?
0
[ 2, 22209, 293, 8, 252, 7748, 26, 421, 3579, 18, 19, 20054, 1854, 60, 800, 3726, 3726, 1142, 16, 21, 78, 5893, 15, 17, 749, 20, 1465, 70, 301, 30, 22, 18, 910, 1450, 1935, 45, 31, 22, 79, 749, 20, 13, 7, 25325, 7, 109, 1854, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Canvas fillStyle from number === I am trying to get my canvas to use a fill style from an array of ARGB integers. Here is a minimally working example which can be lifted into JSFiddle: var ctx = $('#cv')[0].getContext("2d"); var pal = [0x00000000, 0xff000000, 0xffff0000]; var col = '"#' + (pal[2]&0xffffff).toString(16) + '"'; alert(col); ctx.fillStyle = col; ctx.fillRect(0, 0, 200, 200); This gives me a black rectangle, and the fillStyle remains `"#000000"`, yet the correct color is alerted. What have I missed?
0
[ 2, 9696, 3509, 4381, 37, 234, 800, 3726, 3726, 31, 589, 749, 20, 164, 51, 9696, 20, 275, 21, 3509, 1034, 37, 40, 7718, 16, 13, 10663, 220, 13820, 18, 9, 235, 25, 21, 8663, 102, 638, 823, 56, 92, 44, 2493, 77, 487, 18, 1707, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using UiApp.createApplication() twice in Googlesites === I have wrote a script that was run from a spreadsheet. I had - One main UI - One warning UiApp, that will be showed when details entered by the user matched a certain criteria. I used two functions that used two different, var app = UiApp.createApplication(); /*.... .... .... */ doc.show(app); However, when i used Googlesite's script editor, i could create only one UIapp, using doget(e). Whenever i use, var app = UiApp.createApplication(); in another function, it doesnt work out well, Is it possible to have more than one UiApps or should i use only one UI for my app?
0
[ 2, 568, 13, 5661, 7753, 9, 6037, 1373, 2552, 20669, 5, 6, 2088, 19, 8144, 18, 6359, 800, 3726, 3726, 31, 57, 738, 21, 3884, 30, 23, 485, 37, 21, 1789, 17627, 9, 31, 41, 13, 8, 53, 407, 13, 5661, 13, 8, 53, 3590, 13, 5661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I see the colored log using tail or less? === ![enter image description here][1] Reading a `Rails` log with `vim`, we can see a colored log. But when we use `tail -f` or `less` to watch the log, it isn't colorized anymore. Is there any way to see the colored log with `tail` or `less` or whatever? [1]: http://i.stack.imgur.com/xNEei.png
0
[ 2, 184, 92, 31, 196, 14, 10133, 6738, 568, 3424, 54, 787, 60, 800, 3726, 3726, 13, 187, 2558, 13679, 1961, 5318, 235, 500, 2558, 165, 500, 1876, 21, 13, 1, 7301, 18, 1, 6738, 29, 13, 1, 1755, 79, 1, 15, 95, 92, 196, 21, 1013...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Retrieve filename extension for multiple uploaded files (Class Upload, PHP) === Language: **PHP** / Using [**Class Upload** by Colin Verot][1] About: **Multiple Uploading** The code below already uploads the files fine, it works... **PROBLEM: I am having trouble figuring out how to get the filename *extension***. (In a comment below, I have specified where my problem area is...) <!-- language: lang-php --> // CONNECTION TO DATABASE HERE... // INCLUDE UPLOAD CLASS LIBRARY include (dirname(__FILE__).'/lib/class.upload.php'); $files = array(); foreach ($_FILES['fileupload'] as $k => $l) { foreach ($l as $i => $v) { if (!array_key_exists($i, $files)) $files[$i] = array(); $files[$i][$k] = $v; $imagename = $_FILES['fileupload']['name']; } } foreach ($files as $file) { // THIS IS MY PROBLEM AREA, GETTING FILE EXTENSION $ext=strchr($imagename,"."); $generate_name = rand(100,99999); $generate_name_extra = rand(200,9999); $filenamex = "PHOTO_".$generate_name.$generate_name_extra."_".time(); $filenamex_thumb = $filenamex."_thumb"; // COMPLETE FILENAME WITH EXTENSION $filename = $filenamex.strtolower($ext); $handle = new upload($file); if ($handle->uploaded) { ///// 1 //////////////////////////////////////////////////////////////////// $handle->file_new_name_body = $filenamex_thumb; $handle->image_resize = true; $handle->image_x = '300'; $handle->image_ratio_y = true; $handle->jpeg_quality = '100'; // ABSOLUTE PATH BELOW $handle->process($absoRoot.'covers/thumbs/'); if ($handle->processed) { // SUCCESSFUL RESPONSE } else { // FAILED RESPONSE } } } And the webform is: <!-- language: lang-php --> <form method="post" action="upload.php" enctype="multipart/form-data"> <input name="fileupload[]" id="fileupload" type="file" multiple> I really pretty much need the file extensions to serve the files correctly online, but I can't spot where to find it. I have tried using: `$files[$i][$k]` instead of `$imagename` in my specified *problem area* above, as well as `$file` and other possible solutions, but I can't spot which one's going to give me the filename with extension. Hopefully someone could point it out. Thank you for your time and assistance! [1]: http://www.verot.net/download/class.upload.php/class.upload.txt
0
[ 2, 11917, 3893, 7259, 3896, 26, 1886, 23782, 6488, 13, 5, 1898, 71, 8294, 15, 13, 26120, 6, 800, 3726, 3726, 816, 45, 13, 1409, 26120, 1409, 13, 118, 568, 636, 1409, 1898, 71, 8294, 1409, 34, 6016, 2494, 2779, 500, 2558, 165, 500,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Securing access to editing user details === I've hit a bit of a stumbling block on which direction to go on what I believe to be a very common task. Where do you verify that the logged in user is allowed to edit a piece of data. In this case, a `User` has an Id, EmailAddress, Name and a collection of `Address` objects. An `Address` contains several properties, one which is a UserId, the id of the user that it belongs to. A user should only be allowed to edit `Address` objects which belong to them. When editing an `Address` when/where do you check the user is allowed to do so. I've just learned ASP.NET MVC3 this week and am putting it to practice. I have created a web application which logs the user in using the default MembershipProvider (I'll replace this with a custom one at a later date). The end result is that after logging in, the `User.Identity.Name` property in the controller returns the users email address. If a user wants to view there own details, I call the `Addresses` action on the `AccountController`. As below. [Authorize] public ActionResult Addresses() { IEnumerable<Address> addresses = _myService.GetUserAddresss(User.Identity.Name)); return View(addresses); } Now If a user wants to edit address details they can call an action to get the address and display it, and an action to save the edits to the address. [Authorize] public ActionResult Address(int id) { Address address= _myService.GetAddress(id)); return View(address); } [Authorize] [HttpPost] public ActionResult Address(EditAddressModel model) { Address address = _myService.SaveDetail(model.Address)); return View(address ); } The flaw in the above methods, is that if a user visits the url `../Account/Address/12`. Then they can view and edit the `Address` with id 12 (if it exists), regardless of if they created it or not. I'm following an N-tier approach. So I have the Controller talk to a service, which talks to business logic layer, which talks to a repository, which finally talks to a database using Entity Framework 4. Where should the authorisation checking take place? I have considered the following solutions, but cannot decide on the suitable approach. **Idea 1** In the controller class, as the controller has access to the User.Identity.Name property. Using this property, it can check if the userid in the Address returned from the service, matches the currently logged in user. If not, then show an error page, otherwise let them view/edit as normal. Advantage - Simple implementation, just add an extra if statement after the service returns the `Address` object. Controller has access to User.Identity.Name. Disadvantage - Data is returned to the controller, all for the controller to decide the user cannot see it. Feels like business logic of "Only users can edit their own addresses" has creeped into the controller. **Idea 2** In the Business layer. The controller calls a service with userId and detailId (`_myService.GetAddress(User.Identity.Name, detailId));`), which in turn calls the business layer. The business layer has a method `public Address GetAddress(int userId, int addressId)` When the business layer is requested to get an `Address` from the database, it checks the returned address belongs to the user and return it. If not, it returns null. Thus the controller will get a null response from the service, and display a suitable error message. Advantage - Business logic of users only editing their details, is in the business layer. Disadvatage - As the business logic cannot access User.Identity.Name, each method in the service and business classes will need a userId parameter, which feels wrong and unneeded bloat. **Idea 3** As above, except that the Service and Business layer classes, have a property called UserId. This is used to check if the user can access a database resource. This can be set during creation or before calling the service. i.e. [Authorize] public ActionResult Address(int id) { _myService.User = User.Identity.Name; Address address = _myService.GetAddress(id)); return View(address); } Advantage - Business logic of users only editing their details, is in the business layer. No need to pass in the userId to each method call. Disadvatage - I've never seen an example which uses this approach. And I do not feel it is right. Not that I'm using WCF as the service layer. But I'm sure if I was, it wouldn't work to have this extra property. **Idea 4** Access the User.Identity.Name in the business layer, without having to pass it though the service to the business layer from the controller. Not sure if it is possible.
0
[ 2, 13498, 1381, 20, 9510, 4155, 3289, 800, 3726, 3726, 31, 22, 195, 770, 21, 1142, 16, 21, 23034, 1921, 27, 56, 1400, 20, 162, 27, 98, 31, 985, 20, 44, 21, 253, 757, 3005, 9, 113, 107, 42, 21012, 30, 14, 13, 19287, 19, 4155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
export image array to video monotouch === I have big problem in monotouch, i have an array of uiimages that i want to turn them into a movie but the problem is that my method doesnt work, can any body help? this is the main code: SizeF size = new SizeF(480, 320); string path = Environment.GetFolderPath (Environment.SpecialFolder.Personal);string filePath = Path.Combine(path, "Movie.m4v"); string betaCompressionDirectory = filePath; IntPtr error; NSUrl outputPath=NSUrl.FromFilename(betaCompressionDirectory); AVAssetWriter videoWriter; try{ videoWriter=AVAssetWriter.FromUrl(outputPath,"com.apple.quicktime-movie",error); if(videoWriter==null){ return; } }catch(Exception ex) { Console.WriteLine(ex.Message); return; } NSError nserror; if (error != IntPtr.Zero) nserror = (NSError) Runtime.GetNSObject (error); NSObject[] keys = new NSObject[]{ new NSString("AVVideoCodecKey") ,new NSString("AVVideoWidthKey") ,new NSString("AVVideoHeightKey") }; NSObject[] objects = new NSObject[]{ new NSString("AVVideoCodecH264") ,new NSNumber(480) ,new NSNumber(320) }; NSDictionary videoSettings=NSDictionary.FromObjectsAndKeys(objects,keys); AVAssetWriterInput writerInput=new AVAssetWriterInput(AVMediaType.Video,videoSettings); NSDictionary sourcePixelBufferAttributesDictionary = NSDictionary.FromObjectAndKey(NSNumber.FromObject(CVPixelFormatType.CV32ARGB),CVPixelBuffer.PixelFormatTypeKey); AVAssetWriterInputPixelBufferAdaptor adaptor=new AVAssetWriterInputPixelBufferAdaptor(writerInput,sourcePixelBufferAttributesDictionary); if(writerInput!=null) { if(videoWriter.CanAddInput(writerInput)) { videoWriter.AddInput(writerInput); videoWriter.StartWriting(); videoWriter.StartSessionAtSourceTime(CMTime.Zero); UIImage img=UIImage.FromBundle("Images/Image1.png"); CVPixelBuffer buffer=pixelBufferFromCGImage(img.CGImage,size); Console.WriteLine(adaptor.AppendPixelBufferWithPresentationTime(buffer,new CMTime(1,1))); writerInput.MarkAsFinished(); videoWriter.FinishWriting(); if(File.Exists(filePath)){UIView _someView;MPMoviePlayerController _moviePlayer; _someView = new UIView(); _someView.Frame = this.View.Bounds; _moviePlayer = new MPMoviePlayerController (new NSUrl (filePath)); _moviePlayer.View.Frame = _someView.Frame; _someView.AddSubview(_moviePlayer.View); this.View.AddSubview(_someView); _moviePlayer.Play (); } } else { Console.WriteLine("Cant add"); } } and the code for CGImage to CVPixelBuffer CVPixelBuffer pixelBufferFromCGImage(CGImage image,SizeF size) { NSObject[] keys = new NSObject[]{ CVPixelBuffer.CGImageCompatibilityKey , CVPixelBuffer.CGBitmapContextCompatibilityKey }; NSObject[] objects = new NSObject[]{ new NSNumber(true) ,new NSNumber(true) }; NSDictionary options=NSDictionary.FromObjectsAndKeys(objects,keys); CVPixelBuffer pxbuffer=new CVPixelBuffer((int)size.Width,(int)size.Height,CVPixelFormatType.CV32ARGB,options); if(pxbuffer!=null) { pxbuffer.Lock (0); IntPtr pxdata=pxbuffer.BaseAddress; if(pxdata!=IntPtr.Zero) { using(var rgbColorSpace = CGColorSpace.CreateDeviceRGB()) { using(CGBitmapContext context= new CGBitmapContext(pxdata,(int)size.Width,(int)size.Height,8,4*(int)size.Width, rgbColorSpace,CGImageAlphaInfo.PremultipliedFirst)){ if(context != null) { context.DrawImage(new RectangleF(0,0,image.Width,image.Height),image); UIImage imgBufferdanGelen=UIImage.FromImage(context.ToImage()); Console.WriteLine("creating a new image..."); } } } } pxbuffer.Unlock(0); } return pxbuffer; } the video is empty, i think this is because the AppendPixelBufferWithPresentationTime doesnt really works its always returning false...
0
[ 2, 7487, 1961, 7718, 20, 763, 4129, 15725, 800, 3726, 3726, 31, 57, 580, 1448, 19, 4129, 15725, 15, 31, 57, 40, 7718, 16, 13, 5661, 22039, 18, 30, 31, 259, 20, 805, 105, 77, 21, 1308, 47, 14, 1448, 25, 30, 51, 2109, 5886, 170,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a Rails design pattern for searching across multiple tables? === I am building a Rails 3.2 application that will allow a user to applicate parts for sewing machines. I have a relational database of these sewing machines and the different components which determine how a part will fit on it. The structure is simple: Brand has_many Machines Machine has_many Motors Machine has_many CircuitBoards Machine has_many Winders There are several more, and some of the relationships go more than one level deep. A user of this application will be assigning a part of a particular type to a sewing machine. Some parts only need to be assigned at the Machine level, where other parts may need to have other things about a Machine specified, such as the Machine and Motor. I am trying to determine the best way to let a parts owner apply his part to a Machine with the appropriate details. One way I am looking at is to just allow access to the other models via Machine, and build the search so that all searches are done through the Machine model. My problem is that I have some writer's block on how to present the different attributes available for a Machine through a search view interface. Any guidance is greatly appreciated.
0
[ 2, 25, 80, 21, 2240, 18, 704, 3732, 26, 5792, 464, 1886, 7484, 60, 800, 3726, 3726, 31, 589, 353, 21, 2240, 18, 203, 9, 135, 3010, 30, 129, 1655, 21, 4155, 20, 8442, 26811, 1341, 26, 24575, 6035, 9, 31, 57, 21, 5827, 192, 6018...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where does MAMP keep its php.ini? === I have recently got a mac an am not used to developing on a mac at all. I have MAMP Pro 1.9.6.1. I did a locate on php.in and got this: locate php.ini<br /> /Applications/MAMP/conf/php5.2/php.ini<br /> /Applications/MAMP/conf/php5.3/php.ini<br /> /Library/Application Support/appsolute/MAMP PRO/conf/php.ini<br /> /private/etc/php.ini.default I change the name of all of then. Restarted MAMP. It Loaded without a hitch (I know odd right?). I am using PHP version 5.2. All of these files are now different names (done one by one for process of elimination). So I figure restart the mac. Same, MAMP loaded no problems, even though all of the php.ini files had been move. On Lamp this that wouldn't even load. But either there is another php.ini file I'm missing (quite possible I don't know how to updatedb), MAMP is really intelligent and just pulls in all of them (less likely) or it doesn't use one.
0
[ 2, 113, 630, 1216, 2554, 643, 82, 13, 26120, 9, 2651, 60, 800, 3726, 3726, 31, 57, 1989, 330, 21, 1572, 40, 589, 52, 147, 20, 3561, 27, 21, 1572, 35, 65, 9, 31, 57, 1216, 2554, 895, 137, 9, 518, 9, 379, 9, 165, 9, 31, 144,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Correct HTML comments parsing by PHP === I was going to cut fragment of html document which is inside the comments (comments before and after.The target fragment is not commented) `<!--[SOMETEXT]--> <div> my fragment </div> <!--[SOMETEXT]-->` At first i was thinking about regexp, but so much discussion about using DOM extension : http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 (in PHP) instead of regexp. But i cannt get the logic of cutting part of html. I was trying DOM SimpleXML XMLReader, but i dont want to create extra data arrays, I was trying to use SimplXML iterator, but parsing functions doesnt include comments at all. XMLReader is a nice object, but when i `readOuterXML() ` on each element attaching that : `xmlns="http://www.w3.org/1999/xhtml"` .How to remove it? $xml = new XMLReader; $xml->open('cms.htm'); //$xml->setParserProperty(8,true); $store = false; while($xml->read()) { if($xml->name == "#comment") $store = $store ? false : true; elseif($store===true) echo $xml->readOuterXML($xml->value)."<br>"; } Is it true that for DOM object class the comments are protected data? And what the best practice to make a 'big' html templ but shows as default only parts which are not inside comments, or mayble would be better just to make some html's, not one large? Or maybe break html not by comments, no ideas..
0
[ 2, 4456, 13, 15895, 7534, 2017, 18, 68, 34, 13, 26120, 800, 3726, 3726, 31, 23, 228, 20, 1077, 14847, 16, 13, 15895, 4492, 56, 25, 572, 14, 7534, 13, 5, 960, 6601, 115, 17, 75, 9, 124, 2935, 14847, 25, 52, 5973, 6, 13, 1, 18...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a limit to the number of parameters in a TStoredProc? === Is there limit to either the number of params or to the overall size of a params in a TStoredProc ExecProc call? Currently running a system that is still using the BDE to connect to Oracle and a recent change to the number of parameters to a package procedure as started producing access violations. The params count is now up to 291 and the AV is being created in the ExecProc call of TStoredProc. If we remove a single param from the list (any param, does not have to be a specific param), the ExecProc call works fine. I have debugged through the code and the access violation is being thrown with the TStoredProc.BindParams procedure within DBTables.pas. I have several watches set up, one of which is SizeOf(FRecordBuffer) and as I step through this procedure, the value is 65535. This is MaxWord (Windows.pas). I don't see is any specified limits within the DBTables code. The callstack is TStoredProd.ExecProc -> TStoredProc.CreateCursor -> TStoredProc.GetCursor -> TStoredProc.BindParams and the access violation is thrown in the for-loop that iterates through the FParams. Thanks in advance, we need to find something we can pinpoint so we can steer clear.
0
[ 2, 25, 80, 21, 4496, 20, 14, 234, 16, 12905, 19, 21, 13, 38, 16828, 43, 15617, 60, 800, 3726, 3726, 25, 80, 4496, 20, 694, 14, 234, 16, 2258, 79, 18, 54, 20, 14, 1677, 1072, 16, 21, 2258, 79, 18, 19, 21, 13, 38, 16828, 43,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why my App is not showing up on tablets in Google Play? === I just released my app for phones and tablets but it is not showing up in Google Play for tablets. This is what I have in my manifest file <compatible-screens> <!--no small size screens --> <!--Only hdpi and xhdpi for normal size screens --> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> <!-- all large size screens --> <screen android:screenSize="large" android:screenDensity="ldpi" /> <screen android:screenSize="large" android:screenDensity="mdpi" /> <screen android:screenSize="large" android:screenDensity="hdpi" /> <screen android:screenSize="large" android:screenDensity="xhdpi" /> <!-- all xlarge size screens --> <screen android:screenSize="xlarge" android:screenDensity="ldpi" /> <screen android:screenSize="xlarge" android:screenDensity="mdpi" /> <screen android:screenSize="xlarge" android:screenDensity="hdpi" /> <screen android:screenSize="xlarge" android:screenDensity="xhdpi" /> </compatible-screens>
0
[ 2, 483, 51, 4865, 25, 52, 3187, 71, 27, 20175, 19, 8144, 418, 60, 800, 3726, 3726, 31, 114, 261, 51, 4865, 26, 14830, 17, 20175, 47, 32, 25, 52, 3187, 71, 19, 8144, 418, 26, 20175, 9, 48, 25, 98, 31, 57, 19, 51, 13160, 3893,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use g:render in g:select for optionValue? === I have a g:select statement that looks like the following: <g:select id="gearbox" name="gearbox.id" from="${com.nppc.mes.energyusage.Gearbox.list()}" optionKey="id" optionValue="${ {"${it.gearboxType} - (${it.gearboxRatio})"} }" required="" value="${gearboxVoltageInstance?.gearbox?.id}" class="many-to-one"/> I have added an optionValue attribute: `optionValue="${ {"${it.gearboxType} - (${it.gearboxRatio})"} }"` This works as I want. However, I want to show my domain object, Gearboxes the same everywhere. I have created a template, and am able to use the g:render tag on my show.gsp. What I can't figure out is how to get something like this to work: `optionValue="<g:render template="/shared/gearbox" model:="[gearbox:it]"/>" ` Is it possible to use templates to generate the content that goes into an optionValue?
0
[ 2, 184, 20, 275, 489, 45, 99, 16706, 19, 489, 45, 18, 16964, 26, 4255, 15165, 60, 800, 3726, 3726, 31, 57, 21, 489, 45, 18, 16964, 3331, 30, 1879, 101, 14, 249, 45, 13, 1, 263, 45, 18, 16964, 4924, 3726, 7, 834, 512, 5309, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mod_rewrite, change one URL with query to a completely different URL === I am migrating data from one content management system to another. There is no relationship between old URLs and new URLs, although both contain query strings. I am trying to set up a set a rewrites that will redirect broad category lists of data from one to the other. Here's a sample: OLD rss.php?categoryID=53 NEW index.php?module=news&type=user&func=list&tid=1&filter=blogtopic:eq:19 I tried RewriteRule ^rss.php\?categoryID=53 index.php?module=news&type=user&func=list&tid=1&filter=blogtopic:eq:19 [L] but it doesn't match. If I follow that one with RewriteRule ^rss.php index.php?module=news&type=user&func=list&tid=1 [L] if DOES match, so I conclude that the question mark in the old URL is causing the problem. I am already escaping the question mark. What do I do? I will probably end up with about 50 of these in my .htaccess file.
0
[ 2, 7226, 1, 99, 23716, 15, 753, 53, 287, 6362, 29, 25597, 20, 21, 1524, 421, 287, 6362, 800, 3726, 3726, 31, 589, 28749, 1054, 37, 53, 2331, 1097, 329, 20, 226, 9, 80, 25, 90, 1429, 128, 315, 13, 911, 7532, 17, 78, 13, 911, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why doesn't this rudimentary Objective C-block code work? === I am trying to understand the fundamentals of blocks. I wrote this simple test: NSString *(^print_block) () = ^ (NSString *returned_string){ return @"this block worked!"; }; NSLog(@"%@", print_block); I expected console output to be `"this block worked!"`, but instead I get a big flood of error numbers and etc,, ending with: terminate called throwing an exception What up?
0
[ 2, 483, 1437, 22, 38, 48, 29329, 7038, 272, 8, 12048, 1797, 170, 60, 800, 3726, 3726, 31, 589, 749, 20, 1369, 14, 6377, 18, 16, 5198, 9, 31, 738, 48, 1935, 1289, 45, 13, 2172, 11130, 1637, 5, 1, 10299, 1, 12048, 6, 13, 5, 6,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Free and paid Reverse Geocoding Services for an app that polls frequently === I'm in the planning stages of an App and It needs to poll someones location frequently. Depending on your location the app will be affected. I don't need to store this data only use it real time. There are free services I can use, but a lot of them have usage limits I feel I would meet quickly with this kind of app. I could add a check in feature so I am not polling as much but I would like it to be seamless. What are some good services I could use? If my app does well I could move to a paid one if my app needs it but it couldn't be very expensive since I'm a single dev. So please list paid ones too.
0
[ 2, 551, 17, 2192, 7006, 6389, 15458, 687, 26, 40, 4865, 30, 16460, 3086, 800, 3726, 3726, 31, 22, 79, 19, 14, 2334, 4891, 16, 40, 4865, 17, 32, 2274, 20, 4994, 737, 18, 1474, 3086, 9, 4758, 27, 154, 1474, 14, 4865, 129, 44, 41...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to perform animation in Android AndEngine? === When I have to move some sprite on my scene (for example, on 100px down), I'm using this code: Timer timer = new Timer(); for (int i=0; i<10; i++) { delay+=frameDelay; timer.schedule(new TimerTask() { @Override public void run() { sprite.setPosition(sprite.getX(), sprite.getY()+10); } },delay); } It works, but I wonder if there is much correct and/or more fast possibilities to do this.
0
[ 2, 184, 20, 2985, 6236, 19, 13005, 17, 16847, 60, 800, 3726, 3726, 76, 31, 57, 20, 780, 109, 27902, 27, 51, 1691, 13, 5, 1106, 823, 15, 27, 808, 306, 396, 125, 6, 15, 31, 22, 79, 568, 48, 1797, 45, 85, 139, 85, 139, 800, 7...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Convert from 64bit number to 32bit number === Trying a lot and just failing.. $x = 76561198005785475; I want to this number, turn into this: $y = 45519747; That is the 32bit form of it.
0
[ 2, 8406, 37, 4384, 3326, 234, 20, 2512, 3326, 234, 800, 3726, 3726, 749, 21, 865, 17, 114, 7250, 9, 9, 5579, 396, 800, 6914, 3776, 165, 5209, 4071, 4130, 3963, 3283, 73, 31, 259, 20, 48, 234, 15, 805, 77, 48, 45, 5579, 93, 800...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
GEO-reminders launching app === I am thinking about an app which would use the GEO-reminders (those added in iOS5,Remind me at a Location when I leave/arrive ). But I need using this feature (in fact, only using the location) to get the current location and compare it with the defined location by my app and check whether it's the same loc or it isn't. If the current and defined location are the same, launch my app. Is this possible? I hope you to understand my objective. Thanks in advance
0
[ 2, 6389, 8, 99, 15918, 445, 13762, 4865, 800, 3726, 3726, 31, 589, 1440, 88, 40, 4865, 56, 83, 275, 14, 6389, 8, 99, 15918, 445, 13, 5, 13577, 905, 19, 13, 7760, 264, 15, 99, 15918, 55, 35, 21, 1474, 76, 31, 767, 118, 14595, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Large C in SVM but it generalise well? === I am doing a multi-class classification using SVM. I scaled my features to [0,1] and find the parameters C and gamma using grid search as suggested by LIBSVM guide. I use 10-fold cross validation for this. However, the parameter I obtained was quite strange. C is very large (2^15). At first I suspected that the model maybe overfit. I plot the graph between training/validation/test and it looked strange. The larger C, the lower error I got (this is expected). However, the different between training/validation/test is small all the way regardless different C (it suppose to be small when C is small and get larger as C increase, isn't it?). So, I am not sure what is going on? Underfit? Overfit? or is it that there is something wrong with my data? Any thoughts? Thank you guys! Lucy
0
[ 2, 370, 272, 19, 11209, 79, 47, 32, 297, 2628, 134, 60, 800, 3726, 3726, 31, 589, 845, 21, 1889, 8, 1898, 4039, 568, 11209, 79, 9, 31, 22960, 51, 967, 20, 636, 387, 15, 165, 500, 17, 477, 14, 12905, 272, 17, 14598, 568, 7354, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wicket: Is it possible to display components of a panel based on page the panel is added to? === I'm pretty new to Wicket, so please excuse me if this is a simple task. I tried to look for examples but came up empty. Here's the scenario. Lets say that I have a customer information panel with 25 data points (name, dob, address, phone, etc). I want to reuse this panel in many different pages on a site. Now lets say I have the following criteria on 3 different pages the panel appears on: - Page 1 - All fields are visible and editable - Page 2 - Date of Birth, Gender, Customer Name are visible but not editable - Page 3 - Date of Birth and Gender are not visible, Address is visible and editable, all other fields are visible but not editable. Is there a way to use the same panel (to reduce code duplication), but control its components based on the current page the panel is loaded into? Thanks for any help!
0
[ 2, 14414, 45, 25, 32, 938, 20, 3042, 5090, 16, 21, 4113, 432, 27, 2478, 14, 4113, 25, 905, 20, 60, 800, 3726, 3726, 31, 22, 79, 1772, 78, 20, 14414, 15, 86, 2247, 6658, 55, 100, 48, 25, 21, 1935, 3005, 9, 31, 794, 20, 361, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Javascript added rows not responding to click events === I have a form I've been working on that dynamically adds and deletes table rows using javascript. I am also trying to number each of the rows and the text boxes of each row. Lets say I have four rows that I've added. If I delete row number 3, the remaining rows are labelled 1, 2, 4. My jquery should renumber the rows, 1, 2, 3. My code is posted below. I have a hunch that the rows aren't being recognized once they're added. Can anyone help me out with this? <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script type="text/javascript"> function deleteRow(row) { var x = document.getElementById('bom_table'); if (x.rows.length > 4) { var i = row.parentNode.parentNode.rowIndex; document.getElementById('bom_table').deleteRow(i); } } function insRow() { var x = document.getElementById('bom_table'); var len = x.rows.length; // deep clone the targeted row var new_row = x.rows[len - 2].cloneNode(true); // get the total number of rows // set the innerHTML of the first row // new_row.cells[0].innerHTML = len - 2; // grab the input from the first cell and update its ID and value var inp1 = new_row.cells[1].getElementsByTagName('input')[0]; inp1.id += len; inp1.value = ''; // grab the input from the first cell and update its ID and value var inp2 = new_row.cells[2].getElementsByTagName('input')[0]; inp2.id += len; inp2.value = ''; // grab the input from the first cell and update its ID and value var inp3 = new_row.cells[3].getElementsByTagName('input')[0]; inp3.id += len; inp3.value = ''; // grab the input from the first cell and update its ID and value var inp4 = new_row.cells[4].getElementsByTagName('input')[0]; inp4.id += len; inp4.value = ''; // grab the input from the first cell and update its ID and value var inp5 = new_row.cells[5].getElementsByTagName('input')[0]; inp5.id += len; inp5.value = ''; // append the new row to the table var tbody = document.getElementById('bom_table').getElementsByTagName("tbody")[0]; tbody.appendChild(new_row); } function deleteRow2(row) { var x = document.getElementById('ro_table'); if (x.rows.length > 4) { var i = row.parentNode.parentNode.rowIndex; document.getElementById('ro_table').deleteRow(i); } } function insRow2() { var x = document.getElementById('ro_table'); var len = x.rows.length; // deep clone the targeted row var new_row = x.rows[len - 2].cloneNode(true); // get the total number of rows // set the innerHTML of the first row // new_row.cells[0].innerHTML = len - 2; // if (len = 3) // new_row = x.rows[2].cloneNode(true); // else // ; // grab the input from the first cell and update its ID and value var inp1 = new_row.cells[1].getElementsByTagName('input')[0]; inp1.id += len; inp1.value = ''; // grab the input from the first cell and update its ID and value var inp2 = new_row.cells[2].getElementsByTagName('input')[0]; inp2.id += len; inp2.value = ''; // grab the input from the first cell and update its ID and value var inp3 = new_row.cells[3].getElementsByTagName('input')[0]; inp3.id += len; inp3.value = ''; // grab the input from the first cell and update its ID and value var inp4 = new_row.cells[4].getElementsByTagName('input')[0]; inp4.id += len; inp4.value = ''; // grab the input from the first cell and update its ID and value var inp5 = new_row.cells[5].getElementsByTagName('input')[0]; inp5.id += len; inp5.value = ''; // append the new row to the table var tbody = document.getElementById('ro_table').getElementsByTagName("tbody")[0]; tbody.appendChild(new_row); // x.appendChild(new_row); } </script> <script type="text/javascript"> $(document).ready(function () { var i = 0 var j = 1 var k = 1 $('input').each(function (i) { $(this).attr("id", "text_" + i++); }) $('.bom_rowcount').each(function (j) { $(this).attr("innerHTML", 1 + j++); }) $('.ro_rowcount').each(function (k) { $(this).attr("innerHTML", 1 + k++); }) $(".remove").click(removefunction()); function removefunction() { $('input').each(function (i) { $(this).attr("id", "text_" + i++); }) $('.bom_rowcount').each(function (j) { $(this).attr("innerHTML", 1 + j++); }) $('.ro_rowcount').each(function (k) { $(this).attr("innerHTML", 1 + k++); }) }; $(".add").click(function () { $('input').each(function (i) { $(this).attr("id", "text_" + i++); }) $('.bom_rowcount').each(function (j) { $(this).attr("innerHTML", 1 + j++); }) $('.ro_rowcount').each(function (k) { $(this).attr("innerHTML", 1 + k++); }) }); }); </script>
0
[ 2, 8247, 8741, 905, 11295, 52, 15887, 20, 10840, 963, 800, 3726, 3726, 31, 57, 21, 505, 31, 22, 195, 74, 638, 27, 30, 7782, 1326, 10621, 17, 27448, 18, 859, 11295, 568, 8247, 8741, 9, 31, 589, 67, 749, 20, 234, 206, 16, 14, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In Java, the PermGen space is said to be "scaled 30% larger". Does this mean max is no longer necessary? === I recently had cause to look at the [documentation][1] for the `-XX:MaxPermSize` argument to the JVM. Its documentation says in part: > 5.0 and newer: 64 bit VMs are scaled 30% larger Does this mean that `MaxPermSize` is obsolete for Java 1.5 and later virtual machines? Or, as I suspect, does this scaling information simply describe what happens _up to_ the max? (Actually, come to think of it, 30% of _what_?) [1]: http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html#PerformanceTuning
0
[ 2, 19, 8247, 15, 14, 416, 79, 1863, 726, 25, 87, 20, 44, 13, 7, 5093, 43, 13, 12334, 1662, 7, 9, 630, 48, 884, 2049, 25, 90, 1045, 2378, 60, 800, 3726, 3726, 31, 1989, 41, 1679, 20, 361, 35, 14, 636, 28132, 857, 500, 2558, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Testing WebServices in Eclipse === I am having some difficulty with webservice testing in Eclipse. I have the SoapUI plugin and am very confused with how to actually use that. If anyone has a link to some good documentation on using that I would be very appreciative. The other question I have is, I can get the webservice just by adding it to the project. I would ideally like to use TestNG to make the calls to webservice, however when I bring the webservice into my project, it adds several java files to the project and I simply do not know which one to use. The webservice I am testing is: http://www.webservicex.net/ConvertTemperature.asmx?WSDL
0
[ 2, 4431, 2741, 11449, 18, 19, 11652, 800, 3726, 3726, 31, 589, 452, 109, 6967, 29, 2741, 11449, 4431, 19, 11652, 9, 31, 57, 14, 6447, 5661, 10922, 108, 17, 589, 253, 4230, 29, 184, 20, 1121, 275, 30, 9, 100, 1276, 63, 21, 3508, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sharing variables & structures at header files all over the program === I am having a huge problem sharing global variables and 3 structures in the whole c files of my program.I am aware that the use of global variables may not be the best approach,but that seems to suit me for now. The 2 usual errors that appear are: Undefined reference for variable_name error expected ‘=’, ‘,’, ‘%3b’, ‘asm’ or ‘__attribute__’ before variable_name What i am trying to do is: Define my global variables at variables.h and variables.c Define the functions are file1.h, file2.h etc. like : file1.h : #ifndef FILE1_H #define FILE1_H void function_file1(void); #endif file1.c : #include "file1.h" void function_file1(void) { //do sth } I define the global variables and structs as extern in variables.h and then again without the extern keyword at variables.c However after doing that over and over again i keep on getting the 2 above errors.Is there something i am missing?
0
[ 2, 6126, 12157, 279, 3815, 35, 157, 106, 6488, 65, 84, 14, 625, 800, 3726, 3726, 31, 589, 452, 21, 2329, 1448, 6126, 2062, 12157, 17, 203, 3815, 19, 14, 979, 272, 6488, 16, 51, 625, 9, 49, 589, 3854, 30, 14, 275, 16, 2062, 121...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Foreach PHP with dynamic rows === I used below script to add dynamic rows in a form. <TITLE> Add/Remove dynamic rows in HTML table </TITLE> <SCRIPT language="javascript"> function addRow(tableID) { var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var colCount = table.rows[0].cells.length; for(var i=0; i<colCount; i++) { var newcell = row.insertCell(i); newcell.innerHTML = table.rows[0].cells[i].innerHTML; //alert(newcell.childNodes); switch(newcell.childNodes[0].type) { case "text": newcell.childNodes[0].value = ""; break; case "checkbox": newcell.childNodes[0].checked = false; break; case "select-one": newcell.childNodes[0].selectedIndex = 0; break; } } } function deleteRow(tableID) { try { var table = document.getElementById(tableID); var rowCount = table.rows.length; for(var i=0; i<rowCount; i++) { var row = table.rows[i]; var chkbox = row.cells[0].childNodes[0]; if(null != chkbox && true == chkbox.checked) { if(rowCount <= 1) { alert("Cannot delete all the rows."); break; } table.deleteRow(i); rowCount--; i--; } } }catch(e) { alert(e); } } </SCRIPT> <INPUT type="button" value="Add Row" onclick="addRow('dataTable')" /> <INPUT type="button" value="Delete Row" onclick="deleteRow('dataTable')" /> <TABLE id="dataTable" width="350px" border="1"> <TR> <TD><INPUT type="checkbox" name="chk[]"/></TD> <TD><INPUT type="text" name="txt[]"/></TD> <TD> <SELECT name="country[]"> <OPTION value="in">India</OPTION> <OPTION value="de">Germany</OPTION> <OPTION value="fr">France</OPTION> <OPTION value="us">United States</OPTION> <OPTION value="ch">Switzerland</OPTION> </SELECT> </TD> <TD><INPUT type="text" name="passport[]"/></TD> </TR> </TABLE> ###with the use of the following php:### > $chkbox = $_POST['chk']; $txtbox = $_POST['txt']; $country = $_POST['country']; $passport= $_POST['passport']; foreach($txtbox as $a => $b) echo "$chkbox[$a] - $txtbox[$a] - $country[$a] - $passport[$a]"; That works fine, got it showing on my screen. Then I wanted to integrate it all in my extensive form, which I need to be sent off to my mail address... see my php example below (all the $_POST's there are additional). What would the 'foreach' code be to be able to send all the information from above mentioned dynamic rows to my mail address? And what would I have to add to my $message to get it visible? Thanks for your help. >`$TripType = $_POST['TripType']; $DepartureDay = $_POST['DepartureDay']; $DepartureMonth = $_POST['DepartureMonth']; $DepartureYear = $_POST['DepartureYear']; $ReturnDay = $_POST['ReturnDay']; $ReturnMonth = $_POST['ReturnMonth']; $ReturnYear = $_POST['ReturnYear']; $Adults = $_POST['Adults']; $Children411 = $_POST['Children411']; $Children03 = $_POST['Children03']; foreach ($_POST['Check'] as $value) {$check_msg .= $value\n";} $Comments = $_POST['Comments']; $mail = $_POST['mail']; $telephone = $_POST['telephone']; $message = "Booking\n\nTripType: $TripType\n\nDepartureDay: $DepartureDay\nDepartureMonth: $DepartureMonth\nDepartureYear: $DepartureYear\n\nReturnDay: $ReturnDay\nReturnMonth: $ReturnMonth\nReturnYear: $ReturnYear\n\nAdults: $Adults\nChildren411: $Children411\nChildren03: $Children03\n $check_msg\nComments: $Comments\nmail: $mail\ntelephone: $telephone"; $xHeaders = "From: $mail\nX-Mailer: PHP/" . phpversion(); mail ("mymail@gmail.com", internet booking", $message, $xHeaders); `
0
[ 2, 26, 14322, 13, 26120, 29, 7782, 11295, 800, 3726, 3726, 31, 147, 1021, 3884, 20, 3547, 7782, 11295, 19, 21, 505, 9, 13, 1, 22235, 1, 3547, 118, 99, 16598, 7782, 11295, 19, 13, 15895, 859, 13, 1, 118, 22235, 1, 13, 1, 8741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to use NSNotificationCenter to send a notification from one UIButton to another UIButton === How this UIButton rewind can send notification to UIButton play to perform playpauseaction method when rewind button is clicked. -(void)rewind:(id)sender{ [timer invalidate]; audioPlayer.currentTime = 0; MainViewController *viewController = [[MainViewController alloc] init]; viewController.view.frame = CGRectMake(0, 0, 320, 480); [self.view addSubview:viewController.view]; [self.view addSubview:toolbar]; [viewController release]; } -(void)playpauseAction:(id)sender { if([audioPlayer isPlaying]) { [sender setImage:[UIImage imageNamed:@"Play Icon.png"] forState:UIControlStateSelected]; [audioPlayer pause]; [self pauseTimer]; [self pauseLayer:self.view.layer]; } else { [sender setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateNormal]; [audioPlayer play]; [self resumeTimer]; [self resumeLayer:self.view.layer]; if(isFirstTime == YES) { self.timer = [NSTimer scheduledTimerWithTimeInterval:11.0 target:self selector:@selector(displayviewsAction:) userInfo:nil repeats:NO]; isFirstTime = NO; } } } rewind button when clicks perform rewind method and as well send notification to play button to perform playpauseAction method. Thanks for help.
0
[ 2, 184, 20, 275, 13, 2172, 1270, 4634, 12641, 20, 2660, 21, 52, 4634, 37, 53, 13, 5661, 811, 444, 20, 226, 13, 5661, 811, 444, 800, 3726, 3726, 184, 48, 13, 5661, 811, 444, 302, 7809, 92, 2660, 52, 4634, 20, 13, 5661, 811, 444...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Good idea to do matrix divition === I had an idea to matrix divition in haskell as Muliply A* Inverse B I write some code to do that , but this the copilerhas another idea to stop me it say:Invalid type signature :MatrixDivition :: Matrix-> Matrix-> Matrix at line 86:1 Should be of (variable)::(Type) What am I wrong in? this is the code: import List type Vector = [Int] type Matrix = [Vector] --basic constructions for vectors zeroVector :: Int -> Vector zeroVector n = replicate n 0 --basic operations for vectors dotProduct :: Vector -> Vector -> Int dotProduct v w = sum ( zipWith (*) v w ) vectorSum :: Vector -> Vector -> Vector vectorSum = zipWith (+) vectorScalarProduct :: Int -> Vector -> Vector vectorScalarProduct n vec = [ n * x | x <- vec ] --basic constructions for matrices elemMatrix :: Int -> Int -> Int -> Int -> Matrix -- elemMatrix n i j v is the n-by-n elementary matrix with -- entry v in the (i,j) place elemMatrix n i j v = [ [ entry row column | column <- [1..n] ] | row <- [1..n] ] where entry x y | x == y = 1 | x == i && y == j = v | otherwise = 0 idMatrix :: Int -> Matrix idMatrix n = elemMatrix n 1 1 1 zeroMatrix :: Int -> Int -> Matrix zeroMatrix i j = replicate i (zeroVector j) --basic operations for matrices matrixSum :: Matrix -> Matrix -> Matrix matrixSum = zipWith vectorSum matrixScalarProduct :: Int -> Matrix -> Matrix matrixScalarProduct n m = [ vectorScalarProduct n row | row <- m ] matrixProduct :: Matrix -> Matrix -> Matrix matrixProduct m n = [ map (dotProduct r) (transpose n) | r <- m ] {- The determinant and inverse functions given here are only for examples of Haskell syntax. Efficient versions using row operations are implemented in RowOperations.hs .-} --determinant using cofactors remove :: Matrix -> Int -> Int -> Matrix remove m i j | m == [] || i < 1 || i > numRows m || j < 1 || j > numColumns m = error "(i,j) out of range" | otherwise = transpose ( cut (transpose ( cut m i ) ) j ) determinant :: Matrix -> Int determinant [] = error "determinant: 0-by-0 matrix" determinant [[n]] = n determinant m = sum [ (-1)^(j+1) * (head m)!!(j-1) * determinant (remove m 1 j) | j <- [1..(numColumns m) ] ] --inverse cofactor :: Matrix -> Int -> Int -> Int cofactor m i j = (-1)^(i+j) * determinant (remove m i j) cofactorMatrix :: Matrix -> Matrix cofactorMatrix m = [ [ (cofactor m i j) | j <- [1..n] ] | i <- [1..n] ] where n = length m inverse :: Matrix -> Matrix inverse m = transpose [ [ quot x ( determinant m) | x <- row ] | row <- (cofactorMatrix m) ] --Matrix Divition MatrixDivition :: Matrix -> Matrix -> Matrix MatrixDivition m n = matrixProduct m inverse(n) * I wirte the full code for give more informations
0
[ 2, 254, 882, 20, 107, 8187, 13, 11390, 3309, 800, 3726, 3726, 31, 41, 40, 882, 20, 8187, 13, 11390, 3309, 19, 63, 16507, 28, 2832, 6013, 102, 21, 2483, 19, 9453, 334, 31, 2757, 109, 1797, 20, 107, 30, 13, 15, 47, 48, 14, 5326,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
a basic schema for a trading situation === whats a basic database schema for trading items. Here are the rules for the trade: 1. users propose a trade for other user's items. 2. both users can counter each other's proposals as many times. its very brief and general but im just looking for a basic schema to help me in the right direction in designing the database.
0
[ 2, 21, 2125, 23874, 26, 21, 5205, 1858, 800, 3726, 3726, 98, 18, 21, 2125, 6018, 23874, 26, 5205, 3755, 9, 235, 50, 14, 1761, 26, 14, 1238, 45, 137, 9, 3878, 17873, 21, 1238, 26, 89, 4155, 22, 18, 3755, 9, 172, 9, 156, 3878, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
twitter-bootstrap/HTML/CSS : How can I make space between two buttons in same div? === I have jsfiddle here : http://jsfiddle.net/hhimanshu/sYLRq/4/ **Required** - I need some space between both the buttons. What is the best way to achieve this? Thank you
0
[ 2, 10623, 8, 10858, 38, 18, 16514, 118, 15895, 118, 6824, 18, 13, 45, 184, 92, 31, 233, 726, 128, 81, 12861, 19, 205, 13, 12916, 60, 800, 3726, 3726, 31, 57, 487, 18, 1707, 12312, 235, 13, 45, 7775, 6903, 728, 18, 1707, 12312, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
php calculate price between more interval of dates === please help with one idea for my problem, i want to extract from database price for more dates interval, example: i have: from 1.03.2012 to 5.03.2012 = 10 $ from 6.03.2012 to 12.03.2012 =12 $ from 13.03.2012 to 20.03.2012 = 18 $ and i want to calculate price for: `from 2.03.2012 to 15.03.2012 =? $,` Thanks Andrew
1
[ 2, 13, 26120, 18469, 2162, 128, 91, 14422, 16, 4076, 800, 3726, 3726, 2247, 448, 29, 53, 882, 26, 51, 1448, 15, 31, 259, 20, 10962, 37, 6018, 2162, 26, 91, 4076, 14422, 15, 823, 45, 31, 57, 45, 37, 137, 9, 3601, 9, 3212, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
socket.io with c++? === Please tell me can I wrote some c++ console application and connect on some node.js server(on nodester example) which using socket.io? Some (C/C++) -> (node.js/socket.io) library? Thanks
1
[ 2, 18482, 9, 1963, 29, 272, 20512, 60, 800, 3726, 3726, 2247, 494, 55, 92, 31, 738, 109, 272, 20512, 8650, 3010, 17, 6379, 27, 109, 15421, 9, 728, 18, 8128, 5, 218, 16272, 815, 823, 6, 56, 568, 18482, 9, 1963, 60, 109, 13, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python Strange Behavior with List & Append === The following code is an issue I encountered and am looking for an explanation. The behavior of the code different than what I expected. Below the code will be my expected output, and the actual output. One last thing to note, is that I understand this code may be 'strange', and that using range(1) is a bit odd to say the least. The reason for this is that this exact occurrence in a program (the ranges were variables but at these values) caused problems.. so I made this simple code to replicate it. userList = [] class User(): listA = [] listB = [] def setup(self): for i in range(1): self.listA.append('a') self.listB.append('b') for i in range(5): user = User() userList.append(user) for i in range(len(userList)): userList[i].setup() for i in range(len(userList)): print str(userList[i].listA) print str(userList[i].listB) **Expected Output** ['a'] ['b'] ['a'] ['b'] ['a'] ['b'] ['a'] ['b'] ['a'] ['b'] **Actual Output** ['a','a','a','a','a'] ['b','b','b','b','b'] ['a','a','a','a','a'] ['b','b','b','b','b'] ['a','a','a','a','a'] ['b','b','b','b','b'] ['a','a','a','a','a'] ['b','b','b','b','b'] ['a','a','a','a','a'] ['b','b','b','b','b'] **Discussion** I appreciate any explanation as to why this is happening. I'm not sure if the built-in append() function is somehow affecting all Users, or if each User is somehow sharing their fields. Running on Python 2.7.3.
0
[ 2, 20059, 2578, 3257, 29, 968, 279, 4865, 2451, 800, 3726, 3726, 14, 249, 1797, 25, 40, 1513, 31, 8208, 17, 589, 699, 26, 40, 5764, 9, 14, 3257, 16, 14, 1797, 421, 119, 98, 31, 1727, 9, 1021, 14, 1797, 129, 44, 51, 1727, 5196,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery force/trick .scroll() to bubble === Is it possible to force or trick the `.scroll()` event to bubble so I can catch the user scrolling a `<div>` with `overflow: auto;` in ajax loaded content? I am loading some HTML via `$.ajax` and need some way to detect as they are scrolling. According to the W3C scroll should not bubble which is why I assume jQuery doesn't do it. However I am able to catch the `$(window).on('scroll', function() { console.log('scrolling'); });` $(window).load(function() { $.ajax({ url: "/data.html", dataType: "html", success: function(data) { $("#container").html(data); } }); }); $(document).ready(function() { $('#container').on('scroll', '#content', function () { console.log('scrolling'); }); }); The `$('#container')` is the container where the loaded `$.ajax` data is set and the `$('#content')` is from the loaded HTML from the `$.ajax` request
0
[ 2, 487, 8190, 93, 558, 118, 15294, 13, 9, 3862, 8694, 5, 6, 20, 10937, 800, 3726, 3726, 25, 32, 938, 20, 558, 54, 5514, 14, 13, 1, 9, 3862, 8694, 5, 6, 1, 807, 20, 10937, 86, 31, 92, 2949, 14, 4155, 13, 28166, 21, 13, 1, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Programatic UIViews being rotated correctly === I have been doing pretty much all of my User Interface programmatically with slight alterations being performed in Interface Builder.. but 99% of all the UI is exclusively done in code, because I feel there is a certain amount of flexibility gained by doing it this way. However I am now having issues dealing with the rotation of the device, as I have several UIViews being added as subviews I am faced with a rotational problem as this is how I declare the views generally htmlTest.webViewTest.frame = CGRectMake(4.0, 4.0, 312.0, 363.0); and because of this fixed CGRectMake when the device is rotated the view stays the same size and dosent fit the orientation of the view properly. So I have worked on a solution which is in my opinion horrible.. There are a couple of views that I animate in and users can select options from them then I animate them out.. but they need to be able to handle loading in either portrait or landscape and then if while they are loaded they need to be able to handle a rotation from either orientation to the other. This is how I have done one of the views. #pragma createAwesomeJumpBar - (void)jumpBarButtonPosition:(int)changeView { // ChangeView is used to check if the this method is being called from a device rotation or from a button press (0, being rotation and 1, being tabbarButton touch // if tabbar selected if (changeView == 1) { if ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortrait) { if (![jumpBarContainerPortrait superview]) { // load portrait view jumpBarContainerPortrait = [[UIView alloc] initWithFrame:CGRectMake(0.0, 480.0, 320, (jumpBarHeightPortrait + 49.0))]; jumpBarContainerPortrait.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; // add jumpbar container to view [self.view insertSubview:jumpBarContainerPortrait belowSubview:actionTabBar]; [UIView animateWithDuration:0.6 delay:0.0f options:UIViewAnimationCurveEaseIn animations:^{ jumpBarContainerPortrait.frame = CGRectMake(0.0, (367 - jumpBarHeightPortrait), 320.0, (jumpBarHeightPortrait + 49.0)); // display jumpBar } completion:^(BOOL finished) { if (finished) { NSLog(@"YAY!"); } }]; } else if ([jumpBarContainerPortrait superview]) { //unload portrait view [UIView animateWithDuration:0.6 delay:0.0f options:UIViewAnimationCurveEaseIn animations:^{ jumpBarContainerPortrait.frame = CGRectMake(0.0, 480.0, 320.0, (jumpBarHeightPortrait + 49.0)); // display jumpBar // remove selected tabButton highlight [actionTabBar setSelectedItem:nil]; } completion:^(BOOL finished) { if (finished) { // remove subView for superView [jumpBarContainerPortrait removeFromSuperview]; } }]; } } else if ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationLandscapeLeft || [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationLandscapeRight) { if (![jumpBarContainerLandscape superview]) { // load landscape view jumpBarContainerLandscape = [[UIView alloc] initWithFrame:CGRectMake(0.0, 320, 480.0, (jumpBarHeightLandscape + 49.0))]; jumpBarContainerLandscape.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; // add jumpbar container to view [self.view insertSubview:jumpBarContainerLandscape belowSubview:actionTabBar]; [UIView animateWithDuration:0.6 delay:0.0f options:UIViewAnimationCurveEaseIn animations:^{ jumpBarContainerLandscape.frame = CGRectMake(0.0, (207 - jumpBarHeightLandscape), 480.0, (jumpBarHeightLandscape + 49.0)); // display jumpBar } completion:^(BOOL finished) { if (finished) { NSLog(@"YAY!"); } }]; } else if ([jumpBarContainerLandscape superview]) { // remove landscape view [UIView animateWithDuration:0.6 delay:0.0f options:UIViewAnimationCurveEaseIn animations:^{ jumpBarContainerLandscape.frame = CGRectMake(0.0, 320, 480.0, (jumpBarHeightLandscape + 49.0)); // display jumpBar [actionTabBar setSelectedItem:nil]; } completion:^(BOOL finished) { if (finished) { // remove subView for superView [jumpBarContainerLandscape removeFromSuperview]; } }]; } } } // if device rotated selected else if (changeView == 0) { if ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationPortrait) { if([jumpBarContainerLandscape superview]) { // Device is changing from landscape to protrait change views to fit // load landscape view jumpBarContainerPortrait = [[UIView alloc] initWithFrame:CGRectMake(0.0, (367 - jumpBarHeightPortrait), 320.0, (jumpBarHeightPortrait + 49.0))]; jumpBarContainerPortrait.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; jumpBarContainerPortrait.alpha = 1.0; // add jumpbar container to view [UIView transitionFromView:jumpBarContainerLandscape toView:jumpBarContainerPortrait duration:animationSpeed options:UIViewAnimationOptionTransitionCrossDissolve completion:NULL]; [self.view insertSubview:jumpBarContainerPortrait belowSubview:actionTabBar]; } } else if ([[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationLandscapeLeft || [[UIApplication sharedApplication] statusBarOrientation] == UIInterfaceOrientationLandscapeRight) { if ([jumpBarContainerPortrait superview]) { // Device is changing from portrait to landscape change views to fit // load landscape view jumpBarContainerLandscape = [[UIView alloc] initWithFrame:CGRectMake(0.0, (207 - jumpBarHeightLandscape), 480.0, (jumpBarHeightLandscape + 49.0))]; jumpBarContainerLandscape.backgroundColor = [UIColor scrollViewTexturedBackgroundColor]; jumpBarContainerLandscape.alpha = 1.0; // add jumpbar container to view [UIView transitionFromView:jumpBarContainerPortrait toView:jumpBarContainerLandscape duration:animationSpeed options:UIViewAnimationOptionTransitionCrossDissolve completion:NULL]; [self.view insertSubview:jumpBarContainerLandscape belowSubview:actionTabBar]; } } } } in this example, I have two views landscape and portrait, obviously as the names go each are for their respective orientations.. the logic above goes along the lines of this if tabbarselected if !view visible if device orientation portrait animate in portrait view. if device orientation landscape animate in landscape view if view visible if device orientation portrait animate out portrait view clear tabbar if device orientation landscape animate out landscape view clear tabbar if !tabbarselected //meaning listener has identified orientation of device has changed if device orientation portrait unload portrait load landscape if device orientation landscape unload landscape load portrait I would like to know if there is an easier way than going through all of this hassle! I am still fairly inexperienced so this was my best attempt.. I am hoping someone out there knows of an easier approach than having to do all of this leg work to get views being added to other views as subviews adjusting for orientation properly any help would be greatly appreciated! I'm desperate lol :)
0
[ 2, 625, 12479, 13, 5661, 4725, 18, 142, 24107, 12044, 800, 3726, 3726, 31, 57, 74, 845, 1772, 212, 65, 16, 51, 4155, 6573, 625, 6732, 1326, 29, 6442, 18960, 142, 986, 19, 6573, 14960, 9, 9, 47, 13, 26014, 16, 65, 14, 13, 5661, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
math arctan does not work in android project === Well this is my code: float i = Float.parseFloat(a); float j = Float.parseFloat(b); double div=(double)j/i; float theta=(float) Math.atan(Math.toRadians(div)); and theta gets the wrong value. As I can see it always computes Math.tan (I tried also this and gives me the same resutls). So even if I write Math.tan or Math.atan I get the same results. Can you help me?
0
[ 2, 5057, 4686, 2463, 630, 52, 170, 19, 13005, 669, 800, 3726, 3726, 134, 48, 25, 51, 1797, 45, 11510, 31, 800, 11510, 9, 3574, 870, 14712, 721, 5, 58, 6, 73, 11510, 487, 800, 11510, 9, 3574, 870, 14712, 721, 5, 220, 6, 73, 149...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to reference data for bootstrap-typeahead? === This is my data: var markers = { "example": {"lat": -83.68088192646843, "lng": -125.270751953125, "type": "town"}, "anotherexample": {"lat": -58.1548020417031, "lng": -21.318115234375, "type": "town"} } How do I reference this source of data?
0
[ 2, 184, 20, 2801, 1054, 26, 5894, 16514, 8, 4474, 58, 1743, 60, 800, 3726, 3726, 48, 25, 51, 1054, 45, 4033, 19482, 800, 13, 1, 13, 7, 29041, 7, 45, 13, 1, 7, 8927, 7, 45, 13, 8, 4736, 9, 20094, 3020, 13363, 3516, 3790, 240,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...