Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
list
5,861,312
1
5,861,331
null
12
22,855
After I use `.select()` to select the text in the input box when hovered over I did the following: HTML: ``` <input type="text" class="hoverAble" value="hover here"/><br /> ``` jQuery: ``` $(".hoverAble").mouseenter(function() { this.select(); }).mouseleave(function() { //I can't figure what to put here. }); ``` See [here](http://jsfiddle.net/adCfw/2/). The main idea is `mouseleave` is working as [as expected](http://jsfiddle.net/adCfw/3/) also. As you might have noticed, I can't figure out a way to un-select the text when you hover out and avoid this: ![enter image description here](https://i.stack.imgur.com/Nandy.png)
Unselect what was selected in an input with .select()
CC BY-SA 3.0
0
2011-05-02T19:07:34.737
2022-05-11T16:56:31.913
null
null
463,065
[ "jquery", "select", "hover", "unselect" ]
5,861,801
1
5,866,735
null
4
483
Basically it's a task to manage properties, and I am doing a much more complex solution than it is required. It is just the last bit where I struggle. To give you an idea of what we have: - - - - So the part I am struggling with is basically the EstateAgent class. What I wrote so far: [http://pastebin.com/0qieM67j](http://pastebin.com/0qieM67j) That a about 500 lines - But I need help with the theoretical part not the programming part - because I dont want you to do my coursework - I just need the solution how to approach that. The lines I am struggling with are from: 55 to 113 Its about a table that I create and insert rows into it. Each row represents a property. It could be a propertyToLet or a propertyToSell object. Those properties come from my `ArrayList<Property>` properties. The inserting row and showing the table is fine and it is working the way it should. So there is problem with the code. I apologize for the code structure - but we are limited in the submission - so we cannot submit more than 4 files those file are obviously the named classes - so I cannot extend any more classes or files to the project. So what I want to do now is: Editing a property. I have the row that represents a property. It is showing me the position in the arrayList and all the values that I can get. So now there are a few more possibilities.: - - - So basically there are several ways how to continue from here. For instance it could be a behaviour like this: - RightClick on the property opens a context menu where the mouse is and I can choose other options such as: Remove Tenant, Add Tenant, Collect Rent, Show Rent Owed, Add a purchaser, Remove a purchaser ---- ofcourse depending on what kind of property it is.- Double click on a row => edit the property ( have a look at this screenshot) ![enter image description here](https://i.stack.imgur.com/Y7JUb.png) - That would be one solution another one would be: - Edit the cell of the row => changes the value of the property (they will inspect the object and see if that really changed and not just the row value) That are my ideas of how to inject the last steps of bringing the functionality into the application. And than I need an outside opinion what is easier and faster to implement in this very limited task. The way of opening the existing add window and change it to an edit window - I don't want to have redundant code! Or changing the value by editing the cell so that the values in the arraylist change. I need some help with the approach what is easier and what is better. I really appreciate any help here! I am looking forward to see some answers. I finished the popup Menu thank you for your help. I edited the question as wel.
Java table arraylist modification
CC BY-SA 3.0
null
2011-05-02T19:52:15.513
2017-04-25T09:01:41.160
2017-04-25T09:01:41.160
4,370,109
581,268
[ "java", "swing", "row", "edit" ]
5,862,225
1
7,534,363
null
0
134
if i use sqlite3.exe the text is returned from my tables correctly however within android i get squares where the spaces are ``` import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; import android.widget.TextView; public class SqlLiteHelper extends SQLiteOpenHelper { private static final String DB_NAME = "movelist"; private static String DB_PATH = "/data/data/ packagename /databases/"; private Context context; private SQLiteDatabase DB; public SqlLiteHelper(Context context) { super(context, DB_NAME, null, 1); this.context = context; } public List<TextView> getTextViews(String charName, int consoleSwitch, int textSize, String moveTypeSource) { List<TextView> moveList = new ArrayList<TextView>(); String movesSql = new String(); String tableName = new String(); if (moveTypeSource.equals("Grappling")) { tableName = "SevenTypedMoves"; movesSql = "SELECT moveCommand, moveName, moveType, moveDmg, moveEscape, moveProperties FROM " + tableName + " WHERE character_name = '" + charName + "' and moveArt = '" + moveTypeSource + "'"; } DB = getWritableDatabase(); Cursor movesCursor = DB.rawQuery(movesSql, null); if (movesCursor.moveToFirst()) { do { String moveCommand = movesCursor.getString(movesCursor .getColumnIndex("moveCommand")); String moveName = movesCursor.getString(movesCursor .getColumnIndex("moveName")); String moveType = movesCursor.getString(movesCursor .getColumnIndex("moveType")); String moveDmg = movesCursor.getString(movesCursor .getColumnIndex("moveDmg")); String moveEscape = movesCursor.getString(movesCursor .getColumnIndex("moveEscape")); String moveProperties = movesCursor.getString(movesCursor .getColumnIndex("moveProperties")); Log.e("movename: ", moveName); if (consoleSwitch == 1) { // PS3 moveCommand = moveCommand.replaceAll("1", "(͹)"); moveCommand = moveCommand.replaceAll("2", "(▲)"); moveCommand = moveCommand.replaceAll("3", "(X)"); moveCommand = moveCommand.replaceAll("4", "(O)"); moveEscape = moveEscape.replaceAll("1", "(͹)"); moveEscape = moveEscape.replaceAll("2", "(▲)"); moveEscape = moveEscape.replaceAll("3", "(X)"); moveEscape = moveEscape.replaceAll("4", "(O)"); } else if (consoleSwitch == 2) { // XBOX moveCommand = moveCommand.replaceAll("1", "(X)"); moveCommand = moveCommand.replaceAll("2", "(Y)"); moveCommand = moveCommand.replaceAll("3", "(A)"); moveCommand = moveCommand.replaceAll("4", "(B)"); moveEscape = moveEscape.replaceAll("1", "(X)"); moveEscape = moveEscape.replaceAll("2", "(Y)"); moveEscape = moveEscape.replaceAll("3", "(A)"); moveEscape = moveEscape.replaceAll("4", "(B)"); } String s = "|" + moveName + ": " + moveCommand + " |Positioning: " + moveType + " |Escape: " + moveEscape + " |Properties: " + moveProperties; TextView Move = new TextView(context); Move.setText(s); if (textSize == 1) { Move.setTextSize(20); } else { } moveList.add(Move); } while (movesCursor.moveToNext()); } movesCursor.close(); String footnoteSql = "SELECT footnoteText FROM footnote WHERE charname = '" + charName + "' and movesType = '" + moveTypeSource + "'"; Cursor footnoteCursor = DB.rawQuery(footnoteSql, null); if (footnoteCursor.moveToFirst()) { do { TextView footnoteMove = new TextView(context); String footnoteBodyText = footnoteCursor .getString(footnoteCursor .getColumnIndex("footnoteText")); String footnoteText = String.format("FOOTNOTES: \n%s", footnoteBodyText); footnoteMove.setText(footnoteText); moveList.add(footnoteMove); } while (footnoteCursor.moveToNext()); } footnoteCursor.close(); DB.close(); return moveList; } public List<String> getTypes() { List<String> types = new ArrayList<String>(); String footnoteSql = "SELECT footnoteText FROM footnote WHERE charname = '" + charName + "' and movesType = '" + moveTypeSource + "'"; Cursor footnoteCursor = DB.rawQuery(footnoteSql, null); return types; } public void createDataBase() throws IOException { boolean dbExist = checkDataBase(); if (dbExist) { // do nothing - database already exist } else { this.getReadableDatabase(); try { copyDataBase(); } catch (IOException e) { Log.e("Error copying database: ", e.toString()); } } } private boolean checkDataBase() { SQLiteDatabase checkDB = null; try { String myPath = DB_PATH + DB_NAME; checkDB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY); } catch (SQLiteException e) { // database does't exist yet. } if (checkDB != null) { checkDB.close(); } return checkDB != null ? true : false; } private void copyDataBase() throws IOException { InputStream myInput = context.getAssets().open(DB_NAME); String outFileName = DB_PATH + DB_NAME; OutputStream myOutput = new FileOutputStream(outFileName); // transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer)) > 0) { myOutput.write(buffer, 0, length); } // Close the streams myOutput.flush(); myOutput.close(); myInput.close(); } public void openDataBase() throws SQLException { String myPath = DB_PATH + DB_NAME; DB = SQLiteDatabase.openDatabase(myPath, null, SQLiteDatabase.OPEN_READONLY); } @Override public synchronized void close() { if (DB != null) DB.close(); super.close(); } @Override public void onCreate(SQLiteDatabase db) { } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } } ``` RETURNS: sqlite:![SQLITE RETURN](https://i.stack.imgur.com/Tbw4j.png) logcat and emulator screen: ![logcatreturns](https://i.stack.imgur.com/5Difq.png) just wanted to add that the string manipulation being done with .replaceall isnt on the name field at all. and from the output on the screen i can tell its working. PLUS the logcat pic u see was a Log.e placed before all of the manipulation code also that the db is premade and i get NO errors in logcat when it displays.
return from sql showing squares
CC BY-SA 3.0
null
2011-05-02T20:40:46.887
2011-09-23T20:17:30.170
2011-05-02T22:41:13.567
530,933
530,933
[ "android" ]
5,862,352
1
5,862,690
null
0
2,316
I've got database tables like this: ![diagram of three database tables: Person, Membership, and Team](https://i.stack.imgur.com/dZeWV.gif) A person may be a member of many teams. A team may have many members. Each person may have a position (think job title) within the team. I've tried to set this up with ADO.NET Entity Framework and get errors: > Error 3021: Problem in mapping fragments starting at line ... Each of the following columns in table Membership is mapped to multiple conceptual side properties: Membership.PersonId is mapped to <MembershipPerson.Membership.PersonId, MembershipPerson.Person.Id> and > error 3021: Problem in mapping fragments starting at line ... Each of the following columns in table Membership is mapped to multiple conceptual side properties: Membership.TeamID is mapped to <MembershipTeam.Membership.TeamId, MembershipTeam.Team.Id> The primary key of my entity is a compound key of two foreign keys. I think that's the problem. What must I do differently?
Entity Framework Compound Key (Many-To-Many Relationship with a Payload)
CC BY-SA 3.0
null
2011-05-02T20:53:20.180
2011-05-02T21:28:59.743
2011-05-02T21:01:17.103
83
83
[ "entity-framework", "foreign-keys", "primary-key", "composite-key", "compound-key" ]
5,862,409
1
5,863,039
null
0
202
Whenever I try to type in letters to filter my listview, my emulator pulls up some chinese or japanese characters at the bottom instead of filtering out stuff. Really weird. My filter worked fine when I first programmed the activity and I haven't changed the filter at all. Here is my listview activity. ``` public class Browse extends ListActivity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); String[] coffeeTypes = getResources().getStringArray(R.array.coffeeTypes); setListAdapter(new ArrayAdapter<String>(this, R.layout.listview, coffeeTypes)); ListView mylv = getListView(); mylv.setTextFilterEnabled(true); mylv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent myIntent = new Intent(Browse.this, CoffeeTypes.class); myIntent.putExtra("position", position); startActivity(myIntent); } }); } } ``` EDIT: Here is a screencapture of what it is doing. ![enter image description here](https://i.stack.imgur.com/ck1mm.png)
Listview filter is pulling up a different language on the screen
CC BY-SA 3.0
null
2011-05-02T20:59:02.947
2011-05-02T22:11:48.043
2011-05-02T21:27:33.057
728,356
728,356
[ "android", "listview", "filter" ]
5,862,454
1
5,862,552
null
10
10,283
I'm trying to read the text from a popup window. ![errors](https://i.stack.imgur.com/2zlUh.png) The title is always the same. I've managed to identify the hwnd and get the title with the code below, but I can't figure out how to read the contents. ``` import time import win32gui, win32con windows = [] def _MyCallback( hwnd, extra ): extra.append(hwnd) win32gui.EnumWindows(_MyCallback, windows) while True: window = win32gui.GetForegroundWindow() title = win32gui.GetWindowText(window) if title == 'Errors occurred': print 'error window' time.sleep(1) ``` ``` import time import win32gui while True: window = win32gui.GetForegroundWindow() title = win32gui.GetWindowText(window) if title == 'Errors occurred': control = win32gui.FindWindowEx(window, 0, "static", None) print 'text: ', win32gui.GetWindowText(control) time.sleep(1) ```
Get text from popup window
CC BY-SA 3.0
0
2011-05-02T21:04:21.820
2020-09-10T21:36:30.537
2011-05-02T21:24:41.037
88,696
88,696
[ "python", "winapi", "win32gui" ]
5,862,522
1
5,862,721
null
2
188
Hey, I have a problem where parts of the Text in the TextView are out of the screen, Look at the picture: ![enter image description here](https://i.stack.imgur.com/fDqa6.png) I marked the problem in red squares.. xml: ``` <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="right" android:background="@drawable/list" android:padding="15px"> <ScrollView android:id="@+id/ScrollView01" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="right"> <TextView android:id="@+id/TfseerTextView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:textSize="17px" android:textColor="#000" ></TextView> </LinearLayout> </ScrollView> </LinearLayout> ``` Is it possible to fix? Is there any work around? Thanks.
Parts of words in TextView are out of the screen!
CC BY-SA 3.0
0
2011-05-02T21:10:15.293
2011-05-02T21:31:57.140
null
null
668,082
[ "android" ]
5,862,919
1
5,863,391
null
2
5,118
With data that looks like this: ``` Subcategory Title Value Sub1 Name1 2 Sub1 Name2 5 Sub2 Name3 4 Sub2 Name4 1 Sub3 Name5 2 Sub3 Name6 7 Sub4 Name1 7 Sub4 Name2 5 Sub5 Name3 4 Sub5 Name4 3 Sub6 Name5 9 Sub6 Name6 1 ... ... ... ``` I can make a graph that looks like this: ![](https://i.stack.imgur.com/XgXjB.png) Using this code: `p <- ggplot(data=dat, aes(x=Title, y=Value, fill=Subcategory)) + geom_bar(position="stack", stat="identity") + coord_flip()` How do I present the data using facets instead of a stacked bar, as Mr. Hadley did in his geom_bar example? [http://had.co.nz/ggplot2/geom_bar.html](http://had.co.nz/ggplot2/geom_bar.html) I'm a bit lost where it comes to facets and ~ notation, so I'm mostly looking for examples to help me understand. If you know of other good examples, please share.
How can I add facets to my ggplot2 stacked bar graph?
CC BY-SA 3.0
null
2011-05-02T21:56:07.670
2011-05-02T23:00:46.943
null
null
156,044
[ "r", "visualization", "ggplot2", "facet" ]
5,863,102
1
5,863,517
null
0
1,257
![enter image description here](https://i.stack.imgur.com/oZ9KP.jpg) In the attached image, the grid does not show properly. The grid is inside a tabpanel. The layout of the tab is = 'fit'. What setting error is causing the behavior? EDIT: Here is the class definition for the tabpanel: Our tab is the one called 'External ID' ``` /* * File: SomeTabPanel.ui.js * Date: Mon May 02 2011 18:08:34 GMT-0400 (Eastern Daylight Time) * * This file was generated by Ext Designer version xds-1.0.3.2. * http://www.extjs.com/products/designer/ * * This file will be auto-generated each and everytime you export. * * Do NOT hand edit this file. */ SomeTabPanelUi = Ext.extend(Ext.TabPanel, { activeTab: 0, forceLayout: true, border: false, enableTabScroll: true, initComponent: function() { this.items = [{ xtype: 'panel', title: 'General', layout: 'table', tpl: '', ref: 'GeneralTab', layoutConfig: { columns: 2 }, items: [{ xtype: 'form', title: 'Corporate', height: 500, width: 500, animCollapse: false, items: [{ xtype: 'box', ref: '../../coporateBox' }] }] },{ xtype: 'panel', title: 'External ID', layout: 'fit', ref: 'ExtIdTab', id: '' }]; SomeTabPanelUi.superclass.initComponent.call(this); } }); ```
Why does my gridPanel in a tabPanel show the wrong height?
CC BY-SA 3.0
null
2011-05-02T22:19:26.667
2011-05-03T20:42:43.960
2011-05-03T20:42:43.960
77,782
454,671
[ "layout", "extjs", "grid", "tabpanel" ]
5,863,329
1
null
null
4
4,004
I'm following [this tutorial](http://code.google.com/intl/sk/appengine/docs/java/gettingstarted/usingjsps.html) about using [Google engine API](http://code.google.com/appengine/docs/) to create web application. When I add any file with .jsp suffix into my `war` folder the project will not compile any more. ![enter image description here](https://i.stack.imgur.com/YAPYt.png) What can be the reason ? If you need more information please just leave some comment. Thank you.
Eclipse does not work with JSP
CC BY-SA 3.0
0
2011-05-02T22:52:40.670
2011-05-03T12:47:39.527
null
null
311,865
[ "java", "eclipse", "google-app-engine", "jsp", "servlets" ]
5,863,320
1
5,863,359
null
5
28,779
I am trying to add text from a textarea on my site into a MySQL database. Below is the PHP code that is adding the text to the database. ``` if (isset($_POST['text'])) { $text = sanitizeString($_POST['text']); $text = preg_replace('/\s\s+/', ' ', $text); $query = "SELECT * FROM profiles WHERE user='$user'"; if (mysql_num_rows(queryMysql($query))) { queryMysql("UPDATE profiles SET text='$text' where user='$user'"); } else { $query = "INSERT INTO profiles VALUES('$user', '$text')"; queryMysql($query); } } else { $query = "SELECT * FROM profiles WHERE user='$user'"; $result = queryMysql($query); if (mysql_num_rows($result)) { $row = mysql_fetch_row($result); $text = stripslashes($row[1]); } else $text = ""; } $text = stripslashes(preg_replace('/\s\s+/', ' ', $text)); ``` And below is the code of the form. ``` <textarea name='text' cols='40' rows='3'>$text</textarea><br /> ``` But when the data is inputted, it shows it in the database correct but not showing it displayed properly. See the images below: ![the text that is entered](https://i.stack.imgur.com/sEbMh.png) ![this is how the text is displayed](https://i.stack.imgur.com/gLpHT.png) ![this is the text in the database](https://i.stack.imgur.com/RLa7y.png) This is the PHP code that displays the text on the page. ``` $result = queryMysql("SELECT * FROM profiles WHERE user='$user'"); if (mysql_num_rows($result)) { $row = mysql_fetch_row($result); echo stripslashes($row[1]) . "<br clear=left /><br /> ``` Hope you can help!! EDIT: added extra php code
Inserting text from textarea into MySQL database without losing formatting
CC BY-SA 3.0
0
2011-05-02T22:51:32.313
2013-10-24T09:40:53.367
2011-05-02T23:20:50.127
null
null
[ "php", "mysql" ]
5,863,890
1
5,863,965
null
1
1,550
I have this schema for support of in-site messaging: ![enter image description here](https://i.stack.imgur.com/2wACf.png) When I send a message to another member, the message is saved to Message table; a record is added to MessageSent table and a record per recipient is added to MessageInbox table. MessageCount is being used to keep track of number of messages in the inbox/send folders and is filled using insert/delete triggers on MessageInbox/MessageSent - this way I can always know how many messages a member has without making an expensive "select count(*)" query. Also, when I query member's messages, I join to Member table to get member's FirstName/LastName. Now, I will be moving the application to MongoDB, and I'm not quite sure what should be the collection schema. Because there are no joins available in MongoDB, I have to completely denormalize it, so I woudl have MessageInbox, MessageDraft and MessageSent collections with full message information, right? Then I'm not sure about following: 1. What if a user changes his First/LastName? It will be stored denormalized as sender in some messages, as a part of Recipients in other messages - how do I update it in optimal ways? 2. How do I get message counts? There will be tons of requests at the same time, so it has to be performing well. Any ideas, comments and suggestions are highly appreciated!
Moving messaging schema to MongoDB
CC BY-SA 3.0
0
2011-05-03T00:33:45.837
2011-05-03T00:50:23.427
2011-05-03T00:50:23.427
151,200
151,200
[ "mongodb", "schema", "messaging" ]
5,864,003
1
5,864,032
null
1
474
I want to detect collision between a rectangle and an arrow. What is the best algorithm or method for that? I tried to implement Separating Axis Theorem but for following case i get collision = true which is wrong. ![enter image description here](https://i.stack.imgur.com/nB2Ft.png) Also, is an arrow a convex polygon? Thanks for help. Regards
Collision detection between rectangle and arrow
CC BY-SA 3.0
null
2011-05-03T00:56:26.253
2011-05-03T01:01:35.653
null
null
427,969
[ "collision-detection", "collision" ]
5,864,231
1
5,865,245
null
0
1,739
I have came across difficult (for me) Java interview question on finalize method. Suppose you have given finalize method as shown below: ``` public void finalize() { a.b = this; } ``` Now the following object scenario is given. ![enter image description here](https://i.stack.imgur.com/WQoZb.png) How would you solve this problem? If A was not referring to B then this problem could be easier as GC will run, it will collect B and call finalize for B but here A is referring B so its difficult. How finalize will work in this scenario? Any ideas? Thanks in advance
Interview Question on Java finalize method
CC BY-SA 3.0
0
2011-05-03T01:40:36.010
2011-05-03T05:03:55.397
null
null
449,355
[ "java" ]
5,864,377
1
5,864,387
null
2
2,942
I can't figure out why this won't read from my file... ``` #include <iostream> #include <iomanip> #include <string> #include <fstream> using namespace std; int main() { int acctNum; int checks; double interest; double acctBal; double monthlyFee; const int COL_SZ = 3; ifstream fileIn; fileIn.open("BankAccounts.txt"); if(fileIn.fail()) { cout << "File couldn't open." << endl; } else { cout << left; cout << "Bank Account records:" << endl; cout << setw(COL_SZ) << "Account#" << setw(COL_SZ) << "Balance" << setw(COL_SZ) << "Interest" << setw(COL_SZ) << "Monthly Fee" << setw(COL_SZ) << "Allowed Checks" << setw(COL_SZ) << endl; while(fileIn >> acctNum >> acctBal >> interest >> monthlyFee >> checks) { cout << setw(COL_SZ) << acctNum << setw(COL_SZ) << acctBal << setw(COL_SZ) << interest << setw(COL_SZ) << monthlyFee << setw(COL_SZ) << checks << endl; } } fileIn.close(); system("pause"); return 0; } ``` I did make the file from a previous program...would i have to put the reading of the files code into that program? ![The BankAccount.txt file as a picture.](https://i.stack.imgur.com/SE4VQ.png)
Read from file (C++)
CC BY-SA 3.0
null
2011-05-03T02:08:51.397
2011-05-03T12:41:42.847
2011-05-03T12:41:42.847
8,123
629,223
[ "c++", "iostream", "readfile" ]
5,864,633
1
5,945,568
null
9
20,219
I am making a custom ComboBox, inherited from Winforms' standard ComboBox. For my custom ComboBox, I set `DrawMode` to `OwnerDrawFixed` and `DropDownStyle` to `DropDownList`. Then I write my own `OnDrawItem` method. But I ended up like this: ![Standard vs Custom ComboBoxes](https://i.stack.imgur.com/R7gUZ.png) How do I make my Custom ComboBox to look like the Standard one? --- ### Update 1: ButtonRenderer After searching all around, I found the [ButtonRenderer class](http://msdn.microsoft.com/en-us/library/system.windows.forms.buttonrenderer.aspx). It provides a `DrawButton` static/shared method which -- as the name implies -- draws the proper 3D button. I'm experimenting with it now. --- ### Update 2: What overwrites my control? I tried using the Graphics properties of various objects I can think of, but I always fail. Finally, I tried the Graphics of the form, and apparently something is overwriting my button. Here's the code: ``` Protected Overrides Sub OnDrawItem(ByVal e As System.Windows.Forms.DrawItemEventArgs) Dim TextToDraw As String = _DefaultText __Brush_Window.Color = Color.FromKnownColor(KnownColor.Window) __Brush_Disabled.Color = Color.FromKnownColor(KnownColor.GrayText) __Brush_Enabled.Color = Color.FromKnownColor(KnownColor.WindowText) If e.Index >= 0 Then TextToDraw = _DataSource.ItemText(e.Index) End If If TextToDraw.StartsWith("---") Then TextToDraw = StrDup(3, ChrW(&H2500)) ' U+2500 is "Box Drawing Light Horizontal" If (e.State And DrawItemState.ComboBoxEdit) > 0 Then 'ButtonRenderer.DrawButton(e.Graphics, e.Bounds, VisualStyles.PushButtonState.Default) Else e.DrawBackground() End If With e If _IsEnabled(.Index) Then .Graphics.DrawString(TextToDraw, Me.Font, __Brush_Enabled, .Bounds.X, .Bounds.Y) Else '.Graphics.FillRectangle(__Brush_Window, .Bounds) .Graphics.DrawString(TextToDraw, Me.Font, __Brush_Disabled, .Bounds.X, .Bounds.Y) End If End With TextToDraw = Nothing ButtonRenderer.DrawButton(Me.Parent.CreateGraphics, Me.ClientRectangle, VisualStyles.PushButtonState.Default) 'MyBase.OnDrawItem(e) End Sub ``` And here's the result: ![Overwritten ButtonRenderer](https://i.stack.imgur.com/YrUT1.png) Replacing `Me.Parent.CreateGraphics` with `e.Graphics` got me this: ![Clipped ButtonRenderer](https://i.stack.imgur.com/xKJdS.png) And doing the above + replacing `Me.ClientRectangle` with `e.Bounds` got me this: ![Shrunk ButtonRenderer](https://i.stack.imgur.com/oJhIH.png) Can anyone point me I must use for the `ButtonRenderer.DrawButton` method? --- ## I Found An Answer! (see below)
How to make a custom ComboBox (OwnerDrawFixed) looks 3D like the standard ComboBox?
CC BY-SA 3.0
0
2011-05-03T03:05:31.117
2016-11-05T23:11:38.597
2020-06-20T09:12:55.060
-1
149,900
[ "vb.net", "visual-studio-2010", "combobox", "custom-controls", "ondrawitem" ]
5,864,670
1
5,899,950
null
5
2,951
I am encountering problems while trying to create a 3D (2D mapped) graph. The data I am generating should create a 3 dimensional normal distribution bump, or, when "mapped", it should look like a flattened 3D graph, with color used as the third dimension The script I am using to generate the mapped graph is the following: ``` #!/usr/bin/gnuplot reset #set terminal png set term postscript eps enhanced set size square set xlabel "X position" set ylabel "Y position" #set zlabel "Synaptic Strength" #Have a gradient of colors from blue (low) to red (high) set pm3d map set palette rgbformulae 22,13,-31 #set xrange [0:110] #set yrange [0:80] #set zrange [0:1] set style line 1 lw 1 #set title "Title" #Don't want a key unset key #set the number of samples set dgrid3d 51,51 set hidden3d splot DataFile u 1:2:3 ``` when I run it on the following DataFile ([](http://www.sendspace.com/file/ppibyw)[http://www.sendspace.com/file/ppibyw](http://www.sendspace.com/file/ppibyw)) I get the following output ![enter image description here](https://i.stack.imgur.com/gjuWw.png) The legend indicates a z-range of 0-0.03, however, the datafile has far larger z-values, such as 0.1. Obviously I can't publish a graph that is so inaccurate. Furthermore, I need a better graph in order to gain a better insight as to what is wrong with my simulation. Does anyone know why gnuplot handles 3d mapped graphs like this? I suspect it has to do with the number, and nature, of the samples.
3D Mapped Graph with Gnuplot Not accurate
CC BY-SA 3.0
null
2011-05-03T03:14:55.233
2011-05-05T15:03:27.603
null
null
654,789
[ "graph", "3d", "gnuplot" ]
5,864,857
1
5,865,193
null
1
259
I'm currently working on making an interface where I have image links that lean towards the mouse cursor. This is more for fun than as a serious project, but nevertheless the information I'm learning from it will be useful in the future. Right now I have several variables setup... - - - = the calculated number will be added to the 'style.top' and 'style.left' of the link``` calcx = diffx - spacex calcy = diffy - spacey link.style.top = calcx link.style.top = calcy ``` If I set `spacex/y = 0` the link is centered on the cursor If I set `spacex/y = diffx/y` the link is set to its normal position My goal is to have a link that leans slightly towards the cursor (maybe at max 40px from the original position) and as the cursor gets closer to the link, the link will slowly return to its original position. When the cursor gets within, let's say, 100px the link should (smoothly) jump towards the cursor as if to say "pick me!" ![Graph](https://i.stack.imgur.com/s9m7s.png) I need a way to write this as a javascript equation. I haven't taken algebra in awhile and I'm pretty sure we didn't go over anything that looked like this exactly. I'm guessing it has an exponent and a conditional in there somewhere, but I'm not quite sure. If your able to figure this out, I'd be really thankful (not to mention impressed). for your help!
What would the equivalent Javascript equation be for this graph?
CC BY-SA 3.0
null
2011-05-03T03:59:45.820
2011-05-04T01:58:47.267
2011-05-03T04:59:44.060
15,168
723,374
[ "javascript", "math", "equations" ]
5,865,100
1
5,865,185
null
0
189
I'm getting this top margin from `alexchen.info #2`. I'm not sure what's that. It is not my CSS file (`style.css`). ![enter image description here](https://i.stack.imgur.com/Z5HrE.png) ![enter image description here](https://i.stack.imgur.com/wFBei.png) I'm not sure what other information provide. Any suggestions?
html tag has 28px to margin which seems to come from nowhere
CC BY-SA 3.0
null
2011-05-03T04:42:56.033
2011-05-03T04:57:28.477
2011-05-03T04:48:34.987
122,536
122,536
[ "css" ]
5,865,110
1
5,870,663
null
0
288
Earlier i have purchased a web space of PHP and a domain name . Now i have purchased another web sapce of ASP.net .I want to bind my existing domain name with my new Web space. So through some google search i came to know to i have to make Entry of the new server's Ip in the DNS zone. In my previous PHP's Cpanel i m having the following window. Should i make entry from here , and what should I enter at these textboxes. ![enter image description here](https://i.stack.imgur.com/bk3VU.png) Please help.
how to change Ip address binding through PHP CPanel
CC BY-SA 3.0
0
2011-05-03T04:44:00.330
2011-05-03T14:03:34.743
null
null
395,661
[ "php", "asp.net", "cpanel" ]
5,865,401
1
null
null
0
432
In GetButtonID function, when more than one button event handler is given ,then it autoexits before showing the Directory MUI page dialog. But, when only one button event handler is given , then the Directory page is displayed without any problems. ``` !include "MUI2.nsh" !define IDC_BUTTON_CDRIVEPATH 1200 !define IDC_BUTTON_DDRIVEPATH 1201 ;--------------------------------------- ;Name and file Name Remove_ERROR OutFile solve_error.exe ; ------------------------------- !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\setup.ico" ; !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\icon.bmp" !define MUI_WELCOMEFINISHPAGE_BITMAP"${NSISDIR}\Contrib\Graphics\Wizard\img.bmp" !define MUI_ABORTWARNING !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\licensefile.txt" !define MUI_PAGE_CUSTOMFUNCTION_SHOW GetButtonID ** <---in this function only one button event handler works, if two handlers are given , then installer crashes** !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH Function **CDRIVEPATH** MessageBox MB_OK|MB_ICONEXCLAMATION "The Software will be installed in : C Drive" FunctionEnd Function **DDRIVEPATH** MessageBox MB_OK|MB_ICONEXCLAMATION "The Software will be installed in : D Drive" FunctionEnd ;-------------------------------- Function **GetButtonID** GetFunctionAddress $R2 CDRIVEPATH ButtonEvent::AddEventHandler ${IDC_BUTTON_CDRIVEPATH} $R2 ;when this second button handler is given ,then installer autoexits as soon as it has to show the Directory MUI Page dialog: GetFunctionAddress $R3 DDRIVEPATH ButtonEvent::AddEventHandler ${IDC_BUTTON_DDRIVEPATH} $R3 FunctionEnd ;------------------------------------------------------------------ Section "INSTALL MAIN SOFTWARE" SetOutPath $INSTDIR File /r "myfolder\*.*" SectionEnd ;------------------------------------------------------------------ ``` ![enter image description here](https://i.stack.imgur.com/QnUKn.png)
button plugin not working for more than one button in MUI NSIS Installer
CC BY-SA 3.0
null
2011-05-03T05:26:30.047
2020-09-05T22:17:58.507
2020-09-05T22:17:58.507
2,370,483
613,929
[ "installation", "plugins", "custom-controls", "nsis", "modern-ui" ]
5,865,528
1
5,865,632
null
8
8,169
I want to customize the slider control but can't find any thing to apply, the slider I want to make should be something like the following image. Please any one suggest me how can I make it.... .![enter image description here](https://i.stack.imgur.com/aDb1g.png)
Customizing a slider control
CC BY-SA 3.0
0
2011-05-03T05:44:09.817
2013-10-12T12:25:00.777
2011-05-03T06:23:43.703
631,629
531,877
[ "iphone", "objective-c", "ios4", "uislider" ]
5,865,750
1
5,869,388
null
0
1,306
I have a small news module on the home page in my website. It shows the news articles added from the Joomla admin. It shows the article title in the module section. But I do not want to show article title in the news module on the home page. I need to show some other text in the news module instead of the news title. For this I have added a new custom parameter called "News title" in the article manager. This new custom parameter is getting saved and updated properly with the other article content. But I am having problems while retrieving the value of this custom parameter in the news module. Below is the code which is used to get the title of the article in the module. ``` // getting content $this->content = $newsClass->getNewsStandardMode($categories, $sql_where, $this->config, $this->config['news_amount']); // $this->SIDTab = $this->content['SID']; $this->titleTab = $this->content['title']; $this->textTab = $this->content['text']; $this->idTab = $this->content['ID']; $this->cidTab = $this->content['CID']; ``` ![enter image description here](https://i.stack.imgur.com/CxXVP.jpg) Below is my code used to show article title. ``` function render(&$params) { $content = array(); // for($i = 0; $i < count($this->idTab); $i++) { $content[$i] = ''; // if($this->config['links'] == 1) { $url = $this->idTab[$i].'&Itemid='.$this->config['item_id']; if ($this->config['url'] != ""){ $content[$i] .= '<a href="'.$this->config['url'] .'">'; } else { $content[$i] .= '<a href="'.JRoute::_(ContentHelperRoute::getArticleRoute($url, $this->cidTab[$i], $this->SIDTab[$i])).'">'; } } // some more code } ``` Please help. Thanks.
Get custom advanced parameter from article in my module in Joomla
CC BY-SA 3.0
null
2011-05-03T06:13:09.767
2011-05-03T12:24:32.407
2011-05-03T07:03:44.510
548,396
644,518
[ "php", "joomla" ]
5,865,798
1
null
null
1
952
I Have a silly problem with combobox selectedindex.I have a usercontrol(UC) and I place a combobox on it. in UC load event I bind combo to a datatable(or even List) that has 10 rows and then I want to select socond Item but I get an out of range exception. the fun is when I comment selecting second row and run application combo has if I use any thing instead of BindingSource I have prolem.Ho I can Solve That? thanks Edit 1) Here is the code: ``` comboBox1.DataSource = dsBase.Tables["MyDt"]; comboBox1.DisplayMember = "Desc"; comboBox1.ValueMember = "ID"; comboBox1.SelectedIndex = 1; ``` Can any body Explain this images? ![1](https://i.stack.imgur.com/lpWfX.jpg) ![2](https://i.stack.imgur.com/SfX8y.jpg) ![3](https://i.stack.imgur.com/R2QNf.jpg) ![4](https://i.stack.imgur.com/32KnT.jpg)
silly problem with combobox SelectedIndex and selectedValue in c# windows application
CC BY-SA 3.0
0
2011-05-03T06:19:33.693
2011-05-14T10:25:18.500
2011-05-14T10:25:18.500
41,956
648,723
[ "c#", ".net", "asp.net", "user-controls", "combobox" ]
5,865,825
1
5,865,894
null
24
61,792
I am trying to achieve UI as shown in the image. However I am having little hard time after trying combinations of positioning now I am clueless. Can someone help me with this? ![enter image description here](https://i.stack.imgur.com/hAws2.png) ``` <style> .progress{ position:relative; width:500px; } .bar{ } .percent{ } </style> <div class="progress"> <span class="bar" width="%"></span> <span class="percent">50%</span> </div> ```
Progress bar layout using CSS and HTML
CC BY-SA 3.0
0
2011-05-03T06:22:33.790
2020-04-11T00:33:04.273
2011-05-03T06:28:26.567
196,921
237,743
[ "html", "css", "progress-bar" ]
5,865,963
1
5,866,028
null
8
16,688
I got this error when validating my page with w3c's validator. ![I got this error when validating my page with w3c's validator.](https://i.stack.imgur.com/a9wIX.png) ``` <form action="form.php" method="post"> <input type="text"/> </form> ``` Can someone show me why I may have gotten this error? Thanks in advance!
w3c validator gives 'document type does not allow element "input" here...' error
CC BY-SA 3.0
0
2011-05-03T06:38:55.107
2015-02-25T06:33:45.063
2012-07-19T09:27:08.117
468,793
552,067
[ "html", "forms", "validation", "xhtml", "html-validation" ]
5,866,580
1
5,868,459
null
0
474
I've a little problem on my graph when using core-plot. I plot my datas using 2 arrays, 1 for Y axe and 1 for X axe, classic. My problem is that I have values like this: Values Array : ( "0.105814", "0.105828", "0.1058", "0.105814", "0.1058", "0.105793", "0.105779", "0.10575", "0.10575", "0.10558" And when I display the graph, I just see that: ![screenshot](https://i.stack.imgur.com/0nL2G.png) And I don't want one "0,1" but the entire value. I didn't find the parameter so if someone know, I guess it's not really complicated. Thanks for any help! PS: And I know it's not "label" like labels are used in core-plot but I don't know how to call it :P And sorry for my English.
Core-plot, label length
CC BY-SA 3.0
null
2011-05-03T07:45:36.637
2011-05-03T11:01:01.397
null
null
475,772
[ "iphone", "objective-c", "core-plot" ]
5,866,672
1
5,866,748
null
0
868
Making a system with my group in school and got a problem figuring out how to do this... I have a table, I got JSP to fill out with some data using a for-loop. Each of the data in the table-cells represent an object using the power of JPA. They, of course, have an `id` of their own. In our java code, we want to be able to finish off a Task using a method we called `setDone(true)`. How are can this be done visually on the JSP page? I was guessing Jquery/ajax was a way to do it. I hope this makes sense. Here you can see the tick/untick buttons. ![enter image description here](https://i.stack.imgur.com/vqQTL.png) This is how my HTML/JSP code looks like: "> "> "> ">     And this is the jquery: ``` $(function() { $('#done').click(function() { $.post("servletUri", {id: idParam, done: doneParam}, function() { $("doneImage-id").attr("src", correction-done.png); }); }); }); ``` But i'm still a rookie to jquery, so I have no idea how to implement this.
Making a link perform jquery with Java in JSP
CC BY-SA 3.0
null
2011-05-03T07:55:30.510
2011-05-03T08:33:06.160
2011-05-03T08:33:06.160
515,772
515,772
[ "jquery", "html", "ajax", "jsp" ]
5,866,713
1
5,895,007
null
3
573
Is there a pre-built animation in iOS APIs for the effect you have in "Photos" app on ipad ? I'm referring to the animation associated to the pinch gesture over pictures albums: ![enter image description here](https://i.stack.imgur.com/0H6dV.jpg) I need to implement a similar effect in my app, to display a group of pictures. thanks
How to implement the animation associated to the pinch gesture in "Photos"?
CC BY-SA 3.0
0
2011-05-03T07:59:46.453
2011-05-05T08:52:42.003
2011-05-05T05:40:10.873
257,022
257,022
[ "ios", "ipad" ]
5,866,860
1
5,877,109
null
0
921
I have custom tab control where OnPaint method is override. Then strange growth of tabs occurs. Tabs getting bigger (padding getting bigger) and they width depends on length of the text. When I use default Tab Control - padding is OK. How to avoid this situation when I use UserPaint? ![enter image description here](https://i.stack.imgur.com/wMq4l.jpg) ``` partial class Tab : TabControl { public Tab() { InitializeComponent(); Init(); } private void Init() { this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); } protected override void OnPaint(PaintEventArgs e) { DrawTabPane(e.Graphics); } private void DrawTabPane(Graphics g) { if (!Visible) return; // here we draw our tabs for (int i = 0; i < this.TabCount; i++) DrawTab(g, this.TabPages[i], i); } internal void DrawTab(Graphics g, TabPage tabPage, int nIndex) { Rectangle recBounds = this.GetTabRect(nIndex); RectangleF tabTextArea = recBounds; Point[] pt = new Point[4]; pt[0] = new Point(recBounds.Left + 1, recBounds.Bottom); pt[1] = new Point(recBounds.Left + 1, recBounds.Top + 1); pt[2] = new Point(recBounds.Right - 1, recBounds.Top + 1); pt[3] = new Point(recBounds.Right - 1, recBounds.Bottom); Brush br = new SolidBrush(clr_tab_norm); g.FillPolygon(br, pt); br.Dispose(); StringFormat stringFormat = new StringFormat(); stringFormat.Alignment = StringAlignment.Center; stringFormat.LineAlignment = StringAlignment.Center; br = new SolidBrush(clr_txt); g.DrawString(tabPage.Text, Font, br, tabTextArea, stringFormat); } ``` }
C# Win Forms tab Control tab width error
CC BY-SA 3.0
0
2011-05-03T08:16:48.637
2011-05-04T04:45:08.717
2011-05-04T04:34:23.547
558,053
558,053
[ "c#", "winforms", "forms" ]
5,867,374
1
5,876,617
null
3
1,420
![enter image description here](https://i.stack.imgur.com/6fqzQ.png) Is the forwarding (highlighted by the blue arrow) necessary? I figured the add instruction would successfully write back to register before the OR instruction reads it.
MIPS Pipelining Question
CC BY-SA 3.0
null
2011-05-03T09:08:40.107
2015-06-27T19:53:33.363
2011-05-03T22:34:52.847
505,259
505,259
[ "mips", "forwarding", "pipelining" ]
5,868,086
1
null
null
0
1,999
is it possible to repeat only right side of picture. If I have a menu button picture, there are border or stripe on left side and I only want to repeat right side(without border). When I'm just putting `repeat-x scroll right` or just `repeat-x`, the whole picture will repeat, but I only want right side to repeat, not left or whole picture. I hope you understand what I mean. ![button](https://i.stack.imgur.com/Qisqa.jpg) This is button example. When my button title is too long and it will need to repeat button picture. Can I only repeat that yellow part of picture? not together with red. PS! Cant repeat color, because button is made with cradient.
css repeat-x rightside
CC BY-SA 3.0
null
2011-05-03T10:20:34.597
2011-05-03T10:55:35.330
2011-05-03T10:37:53.610
581,785
581,785
[ "css", "image", "repeat" ]
5,868,085
1
null
null
0
660
I have an image which is 450px square below some text in a linear layout and wanted it to fill the width of the device, which I done by using; ``` ImageView android:id="@+id/my_image_container" android:src="@drawable/my_image" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@color/orange" android:scaleType="fitStart" ``` This has worked in a fashion, but the ImageView element fills the rest of the screen and any elements placed under do not show. Does anyone know of a way to trim the bottom of the space that the ImageView uses. Hopefully this image can explain it better - I want to crop the empty area under the image (orange background). ![Example Image](https://i.stack.imgur.com/hbb0B.png)
Trimming ImageView in Android
CC BY-SA 3.0
null
2011-05-03T10:20:19.593
2011-05-04T11:33:23.457
2011-05-04T11:33:23.457
355,375
355,375
[ "android", "android-layout", "android-imageview" ]
5,868,189
1
null
null
0
772
i am building an installer using nsis. i have added 5 buttons using resource hacker on the Directory Page Dialog of the installer. also i have defined these functions: ``` !define IDC_BUTTON_CDRIVEPATH 1200 !define IDC_BUTTON_DDRIVEPATH 1201 !define IDC_BUTTON_EDRIVEPATH 1202 !define IDC_BUTTON_FDRIVEPATH 1203 !define IDC_BUTTON_GDRIVEPATH 1204 !define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\licensefile.txt" !define MUI_PAGE_CUSTOMFUNCTION_PRE DirectoryPre !define MUI_PAGE_CUSTOMFUNCTION_SHOW DirectoryShow !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH ``` --- ``` Function DirectoryShow GetFunctionAddress $R0 DDRIVEPATH ButtonEvent::AddEventHandler ${IDC_BUTTON_DDRIVEPATH} $R0 FunctionEnd ``` --- ``` Function DirectoryPre GetFunctionAddress $R6 EDRIVEPATH ButtonEvent::AddEventHandler ${IDC_BUTTON_EDRIVEPATH} $R6 line 1-- GetFunctionAddress $R7 FDRIVEPATH line 2-- ButtonEvent::AddEventHandler ${IDC_BUTTON_FDRIVEPATH} $R7 line 3-- GetFunctionAddress $R8 GDRIVEPATH line 4-- ButtonEvent::AddEventHandler ${IDC_BUTTON_GDRIVEPATH} $R8 FunctionEnd ``` --- When i do not remove the two handlers & ,i.e. when i do not remove the lines--LINE 1,2,3,4, then,-------------when i goto COMPONENTS page, and press the BACK button to go back to the DIRECTORY page, then the installer exits automatically. i don't know why its happening.? please help? am stuck with it since two days. BUT, when i remove the two handlers & ,i.e. when i remove the lines--LINE 1,2,3,4, then, the installer runs properly. I want all the handlers for these five buttons. i dont want to remove any of them. FOLLOWING IS MY DIRECTORY PAGE DIALOG:--------- ![enter image description here](https://i.stack.imgur.com/fdTa1.png)
nsis installer autoexits/ closes automatically , i am using pre and show functions to show a directory MUI page
CC BY-SA 3.0
null
2011-05-03T10:33:14.620
2020-09-05T22:18:12.237
2020-09-05T22:18:12.237
2,370,483
613,929
[ "installation", "crash", "custom-controls", "nsis", "modern-ui" ]
5,868,354
1
5,869,156
null
0
4,327
I have a ListView where ID and date is entered. The date is in the format dd/MM/yyyy. ![enter image description here](https://i.stack.imgur.com/cuVcv.png) In the SelectedIndexChanged Property I have written this ``` If lvRecruitmentList.SelectedItems.Count > 0 Then txtID.Text = lvRecruitmentList.SelectedItems(0).Text dtpRecievedOn.Text = lvRecruitmentList.SelectedItems(0).SubItems(1).Text End If ``` In the dtpRecievedOn DateTimePicker, the Date is displayed like this ![enter image description here](https://i.stack.imgur.com/FEHFo.png) I have set the following properties via designer ``` dtpRecievedOn.Format = Custom dtpRecievedOn.CustomFormat = "dd/MM/yyyy" ``` : Notice that in the ListView the Date is in the format dd/MM/yyyy and in the dtpRecievedOn the Date is in the format MM/dd/yyyy. How can I make dtpRecievedOn display date in the format dd/MM/yyyy
DateTimePicker displays date in wrong format
CC BY-SA 3.0
0
2011-05-03T10:51:30.497
2011-05-03T17:52:09.823
2011-05-03T10:57:02.223
722,000
722,000
[ "vb.net", "winforms", "datetimepicker" ]
5,868,505
1
5,992,848
null
1
3,070
I have a SharePoint list with `DateTime` field. I'm using the Silveright SharePoint client API to update this fields. When I save a value to the field, it is saved and displayed in SharePoint without problems. But when I try to get the value, it is absolutely different (minus some time). What's wrong with it? In SharePoint, the datetime is: ![enter image description here](https://i.stack.imgur.com/XlFrw.png) Load code: ``` clientContext.Load(contactItem, item => item[Constants.TipFields.Title], item => item[Constants.TipFields.Description], item => item[Constants.TipFields.UserDefinedDateTime], item => item.Id);` ``` Here I have an incorrect date: ``` var description = tipItem[Constants.TipFields.Description] as String; var title = tipItem[Constants.TipFields.Title] as String; var date = tipItem[Constants.TipFields.UserDefinedDateTime] as DateTime; ``` And loaded datetime is: ![enter image description here](https://i.stack.imgur.com/CRBQq.png) What's wrong here?
Sharepoint client API invalid DateTime field
CC BY-SA 3.0
0
2011-05-03T11:05:14.520
2013-05-14T10:07:46.580
2011-05-03T13:04:11.480
17,966
508,330
[ "c#", "silverlight", "sharepoint", "sharepoint-2010" ]
5,868,613
1
5,895,049
null
3
615
I'm in the process of creating a control to represent a employee work shift. The shift can be of different lengths and with none or more breaks. ![Mockup prototype GUI of a 9 hour work shift with an 1 hour break](https://i.stack.imgur.com/xgHl4.png) The following questions refer to the blue bar in the prototype: Since the control need to resize perfectly, then a fixed size approach is not an option. My first thought was to use a grid with columns that has the same width ratio as the time spans. So if you look at the prototype above there would be 3 columns with a width of: 240*, 60*, 240*. These numbers are equal to the total minutes of each time span. If I add a dependency property that hold, lets call them TimeSpanItems (TSI). Each TSI has a TimeSpan property. Is it then possible to bind this to the grid and its column definitions? The number of columns must change as TSI are added and also each column must change its width ratio to match the number of minutes. Am I thinking about this the wrong way? Is it doable? Or is it a items control that I need that resizes its items when the control is resized? At the moment I have different questions that I yet haven't found the answer to... and probably a lot of questions that I don't know yet what they are. Any help would be most welcome.
WPF custom control - specific how to get the correct width ratio
CC BY-SA 3.0
0
2011-05-03T11:14:58.690
2011-05-05T08:56:46.463
null
null
281,030
[ "wpf", "custom-controls" ]
5,868,838
1
null
null
3
5,209
I'm getting a multiplicity constraint violation in my entity model. On my entity model I have two relationship properties: 1. SubstanceTypeMixConstituents 2. Category SubstanceTypeMixConstituents - Multiplicity * (Many) Category - Multiplicity: 1 (One) - Foreign key, not null ![enter image description here](https://i.stack.imgur.com/uEemr.png) How do I find what causing the problem and resolve this issue? ``` System.InvalidOperationException: A relationship multiplicity constraint violation occurred: An EntityReference expected at least one related object, but the query returned no related objects from the data store. at System.Data.Objects.DataClasses.EntityReference`1.Load(MergeOption mergeOption) at System.Data.Objects.DataClasses.RelatedEnd.DeferredLoad() at System.Data.Objects.Internal.LazyLoadBehavior.LoadProperty[TItem](TItem propertyValue, String relationshipName, String targetRoleName, Boolean mustBeNull, Object wrapperObject) at System.Data.Objects.Internal.LazyLoadBehavior.<>c__DisplayClass7`2.<GetInterceptorDelegate>b__2(TProxy proxy, TItem item) at System.Data.Entity.DynamicProxies.SubstanceType_BEE32ACA75386E981F7CA3F6A3C565BC1D8ADACA228C603A2EACC918DCDCBA30.get_Category() ```
Multiplicity constraint violation debug
CC BY-SA 3.0
0
2011-05-03T11:34:19.333
2011-05-05T09:16:41.570
2011-05-05T09:16:41.570
298,830
298,830
[ "c#-4.0", "entity-framework-4" ]
5,868,894
1
5,948,773
null
3
797
I'm searching for an way to of an HTML application. If a user fills in certain values in a form, another form should be displayed. Further if values are filled in, in this child-forms new parts of these child-forms should be shown. I want to , HTML elements in these forms and values of these elements. Based on database information, like table fields and table relationships, I manage via Doctrine, I generate ExtJS forms. Now I have to into my ExtJS forms, in a way that I don't hard code the application flow with ExtJS (JavaScript) code directly. I want to generate the appropriate JavaScript code on runtime, based on a predefined configuration file. For instance: I have X forms ``` FORM 1. (displayed on startup) | |-> FROM 1.1 (only display after values have been inserted into FORM 1.) | |-> FROM 1.2 (only display after values have been inserted into FROM 1.1) | FROM 2. (display when something inserted into FORM 1.) | |-> FROM 2.1 (layout and elements of this form depend upon what has been inserted into FROM 1.) .... ``` Furthermore I only want to an input field ``` FORM 1. (displayed on startup) | |-> LAYER 1. (only display/activate after field <count> of FROM 1. | has been filled in) | |-> LAYER 2. (only display/activate after field <count> of LAYER 1. | has been filled in) | .... ``` Then I want to display forms only if the value the user filled in a form element ``` FORM 1 (displayed on startup) | |-> FROM 1.1 (only display if field <count> of FROM 1. is greater that 10 | count > 10) | |-> FROM 1.2 (if count < 10 display this form) | .... ``` Last I want, based on values the user inserted in a parent form, for input elements to restrict their input range (possible values) Here is a example workflow ![enter image description here](https://i.stack.imgur.com/ju2TR.png) Is there already a metalanguage to define relationships like that? What would be your approach to realize something like that? Regards, J.
Metalanguage to define workflow of HTML application
CC BY-SA 3.0
0
2011-05-03T11:39:30.517
2011-05-22T11:16:51.327
2011-05-04T11:03:41.363
231,982
231,982
[ "javascript", "extjs", "workflow", "metalanguage" ]
5,869,430
1
5,873,866
null
0
1,460
Has anyone succeeded in detecting a text block in image magick? (or any other image library) Example: ![enter image description here](https://i.stack.imgur.com/SUcTN.png)
ImageMagick Detect Text Block
CC BY-SA 3.0
0
2011-05-03T12:27:31.250
2011-05-03T18:17:03.870
null
null
427,221
[ "image", "image-processing", "imagemagick", "image-manipulation" ]
5,869,440
1
5,869,591
null
2
4,486
By following the example of [binaryhowl](https://stackoverflow.com/questions/3700371/not-sure-how-to-use-the-jquery-ui-autocomplete/3700574) I've tried to make my autocomplete dynamic. Source is [here](http://pastebin.com/h8hRYFY9) which should be of close resemblance (modified to fit the url I retrieve my info from). lookup.php returns json compliant (UTF8) results as per (plaintext): ``` ["value1","value2","value3","value4","value5"] ``` If I provide a hardcoded version of the url for source: ``` source: "lookup.php?type=some_case&value=search_term" ``` The autocomplete list of suggestions is piled up as expected. Lookup.php supports ``` application/json; charset=utf-8 ``` And I get the following bugs from jquery: > Uncaught TypeError: Object [object Object] has no method 'menu' jquery-1.5.1.js:869 Uncaught TypeError: Cannot read property 'element' of undefined jquery.ui.autocomplete.js:337 Uncaught TypeError: Cannot read property 'd' of null jquery-1.5.1.js:869 As seen here: ![](https://i.stack.imgur.com/dkEZ6.png) All js scripts are directly from [here](https://github.com/jquery/jquery-ui/blob/master/jquery-1.5.1.js) and [here](https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.autocomplete.js), etc.
jquery ui autocomplete bugs - i can't make it work with json
CC BY-SA 3.0
null
2011-05-03T12:28:23.163
2015-12-12T20:42:24.923
2017-05-23T10:32:35.693
-1
580,492
[ "jquery-ui", "autocomplete" ]
5,869,494
1
5,906,747
null
2
2,840
I need to print the content of my view using my mac app. I get the standard panel for print option. But while previewing my page setup is not proper. I am using the following code for action on print button ``` - (void)print:(id)sender { [[NSPrintOperation printOperationWithView:staticText] runOperation]; float horizontalMargin, verticalMargin; NSSize bounds = [printInfo imageablePageBounds].size; NSSize size = [printInfo paperSize]; horizontalMargin = 0; verticalMargin = 0; [self setPrintInfo:[NSPrintInfo sharedPrintInfo]]; [printInfo setLeftMargin:horizontalMargin]; [printInfo setRightMargin:horizontalMargin]; [printInfo setTopMargin:verticalMargin]; [printInfo setBottomMargin:verticalMargin]; } ``` ![have a look at the image attached](https://i.stack.imgur.com/mlSvE.png)
How to set page layout for print Option programmatically for mac App
CC BY-SA 3.0
null
2011-05-03T12:33:13.847
2017-10-05T14:07:42.727
2011-05-03T12:46:45.570
188,107
212,882
[ "cocoa", "macos", "printing" ]
5,869,705
1
5,982,401
null
3
9,830
I'm trying to use php's mail() function but keep getting an error. I've installed sendmail via `sudo apt-get install sendmail`, edited my `/etc/php5/cli/php.ini` file adding the following text to these lines: ``` sendmail_path = /usr/sbin/sendmail -t sendmail_from = [email protected] ``` I then restarted my webserver and used this command for test: ``` :~$ php -r "mail('[email protected]', 'test subject', 'test body message');" ``` but I get the following error EVERYTIME!!!: ``` sh: -t: not found ``` This is odd because I have tried the sendmail_path with -t and without -t but I keep getting the same error. What am I doing wrong? UPDATE! this is what my phpinfo() shows: (I added -t back but the command isn't working with or without it). ![enter image description here](https://i.stack.imgur.com/PrzJq.png) Another UPDATE - I commented out the sendmail_path and sendmail_from lines to start from scratch expected the mail() function to complain that php doesn't know what it is but instead I get the EXACT same error as before (even without the two lines entirely!!). This leads me to believe that it doesn't have to do with the sendmail program or mail() function at all...
php5 mail() function sendmail error
CC BY-SA 3.0
null
2011-05-03T12:50:55.633
2012-12-21T04:01:27.827
2012-12-21T04:01:27.827
367,456
281,488
[ "php", "apache2", "webserver", "sendmail" ]
5,869,891
1
5,873,296
null
8
7,763
Previously, I calculated the axis of orientation based on anatomical structures, such as the toes in a paw. ![enter image description here](https://i.stack.imgur.com/qeUWQ.jpg) But I found that this doesn't work when I can't distinguish between the toes very well or if the 'heel' (blue square) is way off. So I decided to look for better alternatives and I decided to try and calculate [the inertial axis](https://i.stack.imgur.com/SK0CJ.jpg). [This page gives a great explanation of how to calculate it](http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT2/node3.html), but I have trouble understanding the steps of getting from the Center of Mass (or pressure in my case) to an angle. ![enter image description here](https://i.stack.imgur.com/VbAtU.gif) The explanation boils it down to: ![enter image description here](https://i.stack.imgur.com/SfnNK.gif) which uses the Center of Pressure and a value p, of which I don't know what it is. I had access to the Matlab code that calculated this axis for human feet and did my best to translate it to Python: ``` x = 0.508 # sensor size in the x-direction y = 0.762 # sensor size in the y-direction Ptot = 0 # total pressure Px = 0 # first order moment(x) Py = 0 # first order moment(y) Pxx = 0 # second order moment (y) Pyy = 0 # second order moment (x) Pxy = 0 # second order moment (xy) for row in range(rows): # y-direction for col in range(cols): # x-direction if data[row,col] > 0.0: # If not zero temp = 1 else: temp = 0 Ptot = Ptot + temp # Add 1 for every sensor that is nonzero Px = Px + (x * col + x / 2) * temp Py = Py + (y * row + y / 2) * temp Pxx = Pxx + (x * y * y * y / 12 + x * y * (row * y + y / 2) * (row * y + y / 2) ) * temp Pyy = Pyy + (y * x * x * x / 12 + x * y * (col * x + x / 2) * (col * x + x / 2) ) * temp Pxy = Pxy + (x * y * (row * y + y / 2) * (row * x + x / 2)) * temp CoPY = Py / Ptot CoPX = Px / Ptot CoP = [CoPX, CoPY] Ixx = Pxx - Ptot * self.x * self.y * CoPY * CoPY Iyy = Pyy - Ptot * self.x * self.y * CoPX * CoPX Ixy = Pxy - Ptot * self.x * self.y * CoPY * CoPX angle = (math.atan(2 * Ixy / (Iyy - Ixx))) / 2 Ixp = Ixx * math.cos(angle) * math.cos(angle) + Iyy * math.sin(angle) * math.sin(angle) - 2 * Ixy * math.sin(angle) * math.cos(angle) Iyp = Iyy * math.cos(angle) * math.cos(angle) + Ixx * math.sin(angle) * math.sin(angle) + 2 * Ixy * math.sin(angle) * math.cos(angle) RotationMatrix = [[math.cos(angle), math.sin(angle)], [-math.sin(angle), math.cos(angle)]] ``` So as far as I understood it, sin(angle) and cos(angle) from RotationMatrix are used to determine the axis. But I don't really understand how to use these values to draw an axis through the paw and [rotate it around it](https://stackoverflow.com/questions/4765341/how-can-i-rotate-a-3d-array). [all the sliced arrays that contain the pressure data of each paw](http://dl.dropbox.com/u/5207386/walk_sliced_data)
How to calculate the axis of orientation?
CC BY-SA 3.0
0
2011-05-03T13:06:17.017
2011-05-03T17:46:13.670
2017-05-23T12:00:20.313
-1
77,595
[ "python", "image-processing" ]
5,870,040
1
null
null
0
185
![enter image description here](https://i.stack.imgur.com/FCVKp.png) I want to start the coverflow from mid of the images (i mean from the center to the end))... how can I do it.. .is there is any function in the openflow hoo can help me in this issue..
how to draw coverflow images from the mid of the screen
CC BY-SA 3.0
0
2011-05-03T13:17:24.440
2011-05-03T13:29:56.787
null
null
2,075,384
[ "iphone" ]
5,870,071
1
5,871,327
null
2
1,930
I'm having trouble with a div table control I wrote displaying correctly in IE. My "table" is just a series of divs designed to look like a table, everything looks good in FF and Chrome but can't seem to get my "rows" to display correctly in IE. It seems to scrunch all the rows to the left side of the table and then wrap them. I can adjust this by adjusting the row div's width but I would like to find another work around as this is a control and knowing the proper width to apply can be difficult. Here is a screen shot of what it is doing. ![Here is what it looks like.](https://i.stack.imgur.com/slOru.png) Also just noticed that when I maximize my screen on my 22in widescreen monitor it lines up everything correctly. Not sure what is going there. here is my CSS as well, I think the titles are explanatory enough. ``` .dataTable { border-style: solid; border-width: .5px; border-color: #dae2c1; border-collapse: collapse; font-family: PTSansCaptionBold, Arial, Sans-Serif; } .Table div { font-size: 12px; color: #888; margin: 0; float: left; overflow: hidden; } .HeaderRow div { border: 1px solid #f3f5eb; padding: 5px 3px; background-color: #bcc3a7; color: #FFFFFF; opacity: 0.7; text-transform: uppercase; -moz-user-select: none; user-select: none; cursor: pointer; position: relative; } .DataRow { clear: both; } .DataRow div { border: 1px solid #000000; border-color: #e7ecd7; padding: 5px 3px; min-height: 12px; } ``` Here is some of the html ``` <div class="HeaderRow"> <div style="width: 100px; text-align: left;"><span id="arrow"></span>DRAWING #</div> <div style="width: 100px; text-align: left;"><span id="arrow"></span>LOT #</div> <div style="width: 100px; text-align: left;"><span id="arrow"></span>Serial #</div> <div style="width: 100px; text-align: left;"><span id="arrow"></span>AS BUILT</div> <div style="width: 100px; text-align: left;"><span id="arrow"></span>AS DESIGN</div> <div style="width: 200px; text-align: left;"><span id="arrow"></span>DESCRIPTION</div> </div> <div class="DataRow"> <div style="width: 100px; text-align: left;">0102-10002</div> <div style="width: 100px; text-align: left;"> </div> <div style="width: 100px; text-align: left;">1004</div> <div style="width: 100px; text-align: left;">94</div> <div style="width: 100px; text-align: left;">9</div> <div style="width: 200px; text-align: left;">HUT (HARD UPPER TORSO ASSY)</div> </div> ```
div Table formatting problem in IE
CC BY-SA 3.0
null
2011-05-03T13:19:15.257
2011-05-03T14:48:33.253
2011-05-03T13:31:27.170
20,748
20,748
[ "css", "internet-explorer", "html" ]
5,870,305
1
5,870,387
null
1
1,383
I am having to write quite a complicated query at the moment but I am getting stuck. The table structure is as follows ![sql linked query](https://i.stack.imgur.com/QmG6v.png) Inquiry is linked to Timelog by a field called Inquiry_ID. My current code which brings back total minutes but for the entire table and not per company. What I am basically after: Two Columns one for company name (dbo.inquiry.concom) and another for total minutes. The table INQUIRY holds say 100 entries for the same company, I want a row to return the company name once and the total amount of minutes counted for that company name from TIMELOG.LOGMINS So for example there are 50 entries in dbo.inquiry that have the same company name, I want it to display a distinct company but I need it to total the amount of minutes that is in another table. I am completely lost! ``` DECLARE @StartDate DATETIME, @EndDate DATETIME SET @StartDate = dateadd(mm, - 1, getdate()) SET @StartDate = dateadd(dd, datepart(dd, getdate()) * - 1, @StartDate) SET @EndDate = dateadd(mm, 1, @StartDate) SELECT DISTINCT TOP 100 PERCENT dbo.INQUIRY.CONCOM, TIMELOG_1.LOGMINS, dbo.INQUIRY.ESCDATE, dbo.INQUIRY.INQUIRY_ID, (SELECT SUM(LOGMINS) AS Expr1 FROM dbo.TIMELOG WHERE dbo.INQUIRY.ESCDATE BETWEEN @Startdate AND @EndDate) AS TOTALMINUTES FROM dbo.INQUIRY INNER JOIN dbo.TIMELOG AS TIMELOG_1 ON dbo.INQUIRY.INQUIRY_ID = TIMELOG_1.INQUIRY_ID INNER JOIN dbo.PROD ON dbo.INQUIRY.PROD_ID = dbo.PROD.PROD_ID INNER JOIN dbo.CATEGORY ON dbo.PROD.CATEGORY_ID = dbo.CATEGORY.CATEGORY_ID WHERE dbo.INQUIRY.ESCDATE BETWEEN @Startdate AND @EndDate ORDER BY dbo.INQUIRY.CONCOM ``` EDIT: The reason the category and product tables are there is because I will need to exclude the count based on whether a product is in a certain category.
SQL Query With Nested Sum
CC BY-SA 3.0
null
2011-05-03T13:37:11.420
2011-11-21T03:21:44.990
2011-11-21T03:21:44.990
3,043
457,024
[ "sql", "sql-server" ]
5,870,535
1
5,871,941
null
2
4,663
I asked a question about this earlier but received no responses, so I'm trying again. I need to do a rendered 2D picture with some accompanying labels and graphics on a Motorola Xoom, Android 3.0. Although what I need can be done with just a SurfaceView (Canvas) or just a GLSurfaceView, I would really like to use both because the rendering is faster with the GLSurfaceView, and the labeling and graphics are easier with the SurfaceView. The visual layout is as shown below. ![SurfaceView/GLSurfaceView visual layout](https://i.stack.imgur.com/Dmb5J.png) I tried to put the SurfaceView on top by declaring it in the layout XML after the GLSurfaceView. The SurfaceView is transparent (except for where I explicitly draw stuff) so that the GLSurfaceView can still be seen. This approach has worked pretty well with one huge exception. Anything that I draw on the SurfaceView that is in the GLSurfaceView region does not show up at all. To verify this I drew some text that was right on the boundary (some in the shared region, some just in the SurfaceView region), and it was chopped off at the GLSurfaceView boundary. I have tried using the "bringToFront" method to fix this, but it hasn't worked. Can anyone give me some ideas on why this isn't working or what I can do about it? Is it that the GLSurfaceView is in front, or is that the GLSurfaceView writes directly to the video memory, so it doesn't matter if something is in front of it?
GLSurfaceView/SurfaceView overlap
CC BY-SA 3.0
0
2011-05-03T13:54:09.720
2016-10-13T06:54:02.173
2011-05-03T14:43:14.430
44,729
724,157
[ "java", "android", "opengl-es" ]
5,870,776
1
5,881,011
null
2
1,656
I would like to know how to implement the slider similar to the one in the Ipad default calendar application. I have attached the image below ![ipad calendar application](https://i.stack.imgur.com/1cOcC.jpg) If you see at the bottom, it acts like a slider which allows us to select any month either by just pressing it or sliding to it. It would be great if anyone could tell me the name of that control. I tried using UISlider but I see that it allows only 3 options: - `setThumbImage`- `setMinimumTrackImage`- `setMaximumTrackImage` If that control is indeed a slider control, could anyone tell me how I would be able to insert multiple images/ text Thanks
slider control similar to ipad default calendar app
CC BY-SA 3.0
0
2011-05-03T14:11:48.983
2014-12-18T18:34:09.993
2012-10-23T11:57:58.587
621,264
621,808
[ "ios", "ipad", "calendar", "uislider" ]
5,870,790
1
null
null
2
461
``` $('<script/>', { src: '/path/to/javascript.js', type: 'text/javascript' }).appendTo($('#iframe').contents().find('body')); ``` Correct me if I'm wrong, but I think that should load the JS into the iframe. I've also tried appending to `head`. `javascript.js` is executed, but `console.debug(this)` in that script returns the top frame window. I've tried to verify that the script is actually included in the iframe, but don't really know how. ![firebug output](https://i.stack.imgur.com/RcPDl.jpg) Additionally, running `$('a')` from `javascript.js` returns all links in the top frame, not every link in the iframe which I'd like. Thanks for your time! --- I've put together [an isolated test case](http://labs2.mimmin.com/other/iframe-dyn-load/) which [you also can download](http://labs2.mimmin.com/other/iframe-dyn-load/iframe-dyn-load.zip). Check the console and note that this is the top frame (can be verified by the variable _TOP).
Included JS in iframe has context of top frame window
CC BY-SA 3.0
0
2011-05-03T14:12:41.123
2014-06-09T21:41:27.457
2011-05-04T08:20:36.610
138,023
138,023
[ "javascript", "jquery", "iframe", "dynamic-loading" ]
5,870,840
1
5,871,001
null
0
1,252
I have alert boxes all around my site, that have been working up until now, ( I have done a few updates to my blog recently before this started happening ) the problem I am experienceing is that when I click on a link ( in my case a image link ) and the alert box appears, I submitt the ok button and suddenly im rediercted to a white page with 'true' in the top corner. My alert box scripts are inside my blog template. I tested this alert box script out in a blog post: ``` <"a href="javascript:onClick=alert(&quot;Not an active link&quot;);">CLICK<"/a> ``` and then went to preview the post, however the same error occured. This is not a browser problem as it only happens on my site, when i got to someone elses with alert boxes, it works. Please help with this I have been asking about it for about a week now and would appreciate someone who can help here is a screenshot of what I get redirected to: ![true](https://i.stack.imgur.com/YJlOl.png) [http://img813.imageshack.us/img813/2674/true.png](http://img813.imageshack.us/img813/2674/true.png) Thanks for all help.
Alert Box error
CC BY-SA 3.0
null
2011-05-03T14:16:01.250
2011-12-03T04:38:26.050
2011-12-03T04:38:26.050
234,976
736,300
[ "javascript", "alert" ]
5,871,115
1
6,453,125
null
10
2,747
I have the following code: ``` - (void)drawRect:(CGRect)rect { CGContextRef c = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(c, [UIColor blackColor].CGColor); CGContextFillRect(c, rect); CGContextSetLineJoin(c, kCGLineJoinRound); CGContextSetLineCap(c, kCGLineCapRound); CGContextSetLineWidth(c, 50.0); CGContextSetStrokeColorWithColor(c, [UIColor redColor].CGColor); CGContextBeginPath(c); CGContextMoveToPoint(c, 60, 60); CGContextAddLineToPoint(c, 60, 250); CGContextAddLineToPoint(c, 60, 249); CGContextStrokePath(c); CGContextSetStrokeColorWithColor(c, [UIColor blueColor].CGColor); CGContextBeginPath(c); CGContextMoveToPoint(c, 160, 60); CGContextAddLineToPoint(c, 160, 250); CGContextAddLineToPoint(c, 160.01, 249); CGContextStrokePath(c); } ``` This generates the following output: ![Output of the code](https://i.stack.imgur.com/yUttH.png) Is there a good reason that the red shape's bottom edge is not rounded? Or is it a bug in Core Graphics when the line exactly doubles back on itself?
Why is the join not rounded when the line doubles back on itself?
CC BY-SA 3.0
0
2011-05-03T14:34:06.987
2011-06-24T13:07:55.203
null
null
634,419
[ "ios", "core-graphics" ]
5,871,176
1
5,871,221
null
2
26,476
Here's the rendered html: ``` <div style="padding-left: 50px; vertical-align: middle;"> <strong>NONE</strong> <img height="15" width="15" src="images/Checked.gif" alt=""> <br> <span style="font-size: larger;">DEFAULT</span> </div> ``` general css: ``` div { font-size:smaller; padding:5px 5px 0 0; float:left; } ``` Here's what the design looks like in firebug: ![enter image description here](https://i.stack.imgur.com/xfBCR.png) I would like the text to align at the top, just the way the image (checkbox) is aligned. Any ideas on how to do this with css?
Top align text and image within div
CC BY-SA 3.0
0
2011-05-03T14:36:51.920
2012-08-24T20:50:52.563
2012-06-05T19:53:05.120
44,390
536,610
[ "html", "css", "css-float", "vertical-alignment" ]
5,871,362
1
5,872,333
null
0
1,350
I have prepared a very short test case (s. below) for my question. On a button click I would like to display a list of strings in a new screen. After the user selects one item in the list, the previous screen should be displayed again and the button label should be set to the selected string. ![screenshot](https://i.stack.imgur.com/cfVmM.png) My 2 problems are: 1. From inside the menu I don't know how to pop the currently displayed screen 2. How to pass the selected item from one screen to another (assuming I don't want to introduce a public variable/method on the former screen as a workaround) Please suggest the necessary changes for my : ``` package mypackage; import java.util.*; import net.rim.device.api.collection.*; import net.rim.device.api.collection.util.*; import net.rim.device.api.system.*; import net.rim.device.api.ui.*; import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; import net.rim.device.api.ui.decor.*; import net.rim.device.api.util.*; import net.rim.device.internal.i18n.*; public class MyList extends UiApplication implements FieldChangeListener { MyScreen myScreen = new MyScreen(); public static void main(String args[]) { MyList app = new MyList(); app.enterEventDispatcher(); } public MyList() { MainScreen titleScreen = new MainScreen(); titleScreen.setTitle("Click the button:"); // TODO change the label of this button (see below) ButtonField myButton = new ButtonField("Show the list", ButtonField.CONSUME_CLICK); myButton.setChangeListener(this); titleScreen.add(myButton); pushScreen(titleScreen); } public void fieldChanged(Field field, int context) { pushScreen(myScreen); } } class MyScreen extends MainScreen { ObjectListField myList = new ObjectListField(); public MyScreen() { setTitle("Select an item below:"); myList.set(new String[] { "Item 1", "Item 2", "Item 3", "Item 4", }); add(myList); addMenuItem(myMenu); } private final MenuItem myMenu = new MenuItem("Select item", 0, 0) { public void run() { int index = myList.getSelectedIndex(); if (index < 0) return; String item = (String) myList.get(myList, index); Status.show("Selected: " + item); // TODO how to return to the previous screen here? // TODO how to call myButton.setLabel(item) here? } }; } ``` Thank you! Alex
Blackberry: select item in a list, return to previous screen
CC BY-SA 3.0
0
2011-05-03T14:51:18.347
2011-05-03T18:36:12.113
2011-05-03T14:58:00.860
165,071
165,071
[ "blackberry", "screen", "mainscreen" ]
5,871,483
1
5,871,605
null
1
5,085
here's the effect: when i move my mouse to the div, a delete link will show up. when i move out the mouse, the delete link disapper. in the firebug, i can see that the delete link's style changes when i hover the div. but can someone tell me how to control this? ![enter image description here](https://i.stack.imgur.com/mW3Hi.png) ![enter image description here](https://i.stack.imgur.com/zirbq.png)
div hover show button/link effect
CC BY-SA 3.0
0
2011-05-03T14:58:59.953
2011-05-03T16:23:49.187
2011-05-03T16:23:49.187
147,373
477,068
[ "javascript", "html", "hover" ]
5,871,680
1
null
null
3
2,542
I'm a little new to OpenGL. I am making a 2D application, and I defined a Quad class which defines a square with a texture on it. It loads these textures from a texture atlas, and it does this correctly. Everything works with regular textures, and the textures display correctly, but doesn't display correctly when the texture image is not a square. For example, I want a Quad to have a star texture, and have the star to show up, and the area around the star image that still lies in the Quad to be transparent. But what ends up happening is that the star shows up fine, and then behind it is another texture from my texture atlas that fills the Quad. I assume the texture behind it is just the last texture I loaded into the system? Either way, I don't want that texture to show up. Here's what I mean. I want the star but not the cloud-ish texture behind it showing up: ![enter image description here](https://i.stack.imgur.com/52ODz.png) The important part of my render function is: ``` glDisable(GL_CULL_FACE); glVertexPointer(vertexStride, GL_FLOAT, 0, vertexes); glEnableClientState(GL_VERTEX_ARRAY); glColorPointer(colorStride, GL_FLOAT, 0, colors); glEnableClientState(GL_COLOR_ARRAY); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, textureID); glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(2, GL_FLOAT, 0, uvCoordinates); //render glDrawArrays(renderStyle, 0, vertexCount); ```
OpenGL non-square textures
CC BY-SA 3.0
null
2011-05-03T15:13:44.227
2013-11-02T18:31:22.880
2011-05-03T15:48:43.087
44,729
534,080
[ "opengl", "textures" ]
5,871,817
1
5,872,594
null
0
438
I am messing around with the GridBagLayout. I have understood it somewhat, hence was able to make this layout. but my As-Is is not matching with my should be. here are the screens. As-Is :( ![As-Is :(](https://i.stack.imgur.com/8N89a.png) ![Should Be :s](https://i.stack.imgur.com/q6NhH.png) Should Be :s I understand that i have to tweak it a bit so that the size is set (`setSize()`). But the real tricky one is getting the "Add Contact" `JLabel` to be in the center at the top. Waiting for your replies. Thanks in Advance. Here's My Code ``` package SimpleCRUD; import java.awt.Component; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; @SuppressWarnings("serial") public class ContactListFrame extends JFrame{ JButton Button1, Button2; JTextField textField1, textField2, textField3; JLabel label1, label2, label3 , label4; GridBagLayout layout = new GridBagLayout(); GridBagConstraints Constraint = new GridBagConstraints(); public ContactListFrame() { super("All Contacts"); Button1 = new JButton("Add"); Button2 = new JButton("Cancel"); textField1 = new JTextField(15); textField2 = new JTextField(15); textField3 = new JTextField(15); label4 = new JLabel("Add Contact"); label4.setFont (new Font("fallan", 1, 25)); label1 = new JLabel("First Name:"); label2 = new JLabel("Last Name:"); label3 = new JLabel("Phone Number:"); setLayout(layout); setDefaultCloseOperation(DISPOSE_ON_CLOSE); setSize(400, 200); setResizable(false); Constraint.fill = GridBagConstraints.NONE; Constraint.anchor = GridBagConstraints.NORTH; addComponent(label4, 0, 1, 1, 1); addComponent(textField1, 1, 1, 1, 1); addComponent(textField2, 2, 1, 1, 1); addComponent(textField3, 3, 1, 1, 1); addComponent(label1, 1, 0, 1, 1); addComponent(label2, 2, 0, 1, 1); addComponent(label3, 3, 0, 1, 1); addComponent(Button1, 4, 0, 2, 1); addComponent(Button2, 4, 1, 2, 1); } public void addComponent (Component comp, int row, int col, int width, int height){ Constraint.gridx = col; Constraint.gridy = row; Constraint.gridwidth = width; Constraint.gridheight = height; layout.setConstraints(comp, Constraint); add(comp); } } ```
Can't precisely understand what and how to use the GridBagConstraints. As-Is vs. Should-Be
CC BY-SA 3.0
null
2011-05-03T15:23:46.537
2011-05-03T18:19:49.357
2011-05-03T15:29:36.830
690,851
690,851
[ "java", "swing", "gridbaglayout" ]
5,872,051
1
5,887,239
null
4
5,412
I have to put the data from a pdf file in a certain database structure. This requires me to be able to get certain data out of the pdf file. Since pdf hasn't got any tags etc ... i was wondering if it is possible to get text based on a color. Say for example i want all the red text. Or i want all the italic text in the document. Is this possible in C# ? Or is there an other way to easily filter data in a pdf document ? ![enter image description here](https://i.stack.imgur.com/jehUb.png)
How to get text with a certain color from a pdf c#
CC BY-SA 3.0
0
2011-05-03T15:41:51.920
2011-05-04T17:12:18.550
2011-05-03T16:06:40.333
1,583
329,829
[ "c#", "pdf", "colors", "itext" ]
5,872,046
1
null
null
2
288
I have this jQuery method I call each time my page is loaded, to resize the content of my main div (which is a scrollable one): ``` function resizeMainContent() { var newSize = jQuery(window).height(); if (window.location.pathname.indexOf("appsportfolio") != -1) { newSize = newSize - 105; } else if (window.location.pathname.indexOf("userapp") != -1) { newSize = newSize - 128; } else if (window.location.pathname.indexOf("password") != -1 || window.location.pathname.indexOf("create_user") != -1 || window.location.pathname.indexOf("create_account") != -1) { newSize = newSize - 105; } if (jQuery.browser.msie) newSize = newSize + 3; jQuery("#mainContentPanel").height(newSize); } ``` Well, on chrome and FF all works great. But, on IE, if this method is called, when I on other divs and I show a popup panel, ... If i uncomment this resizeMainContent function, right click works great... Can you suggest a solution? Thanks. : - here is a screenshot with the issue: I press right click on the first `Text` and the popup appears on the second one![enter image description here](https://i.stack.imgur.com/Jmarw.gif) If I comment the above jQuery method, it appears exactly where I press right click. The div where I press right click has this generated code (actually it is uses a `ice:menuPopup` icefaces component) ``` oncontextmenu="Ice.Menu.contextMenuPopup(event, 'j_id1378:sectionContextMenu_sub', 'j_id1378:j_id1401:0:j_id1413:1:j_id1414');return false;" ``` so it calls some javascript method from their source code which works FINE (their demo works perfectly) so the problem is for sure not in their javascript code...
strange jQuery problem
CC BY-SA 3.0
null
2011-05-03T15:41:13.180
2011-05-04T16:50:08.017
2011-05-03T16:17:56.920
21,677
174,349
[ "javascript", "jquery", "jsf" ]
5,872,406
1
5,872,852
null
2
2,112
I am tackling the monolith of knowledge that is OSGi and have run into a problem where the instructions in an example are insufficient for someone completely unfamiliar with Ant. I am following an example of taking jEdit and breaking it up into bundles, as described in the sample chapter 6 of [OSGi in Action](http://www.manning.com/hall/). One of the first steps is to edit the build.xml file, specifically to remove the jar task and replace it with the bnd definition. And then I am told to 'add instructions to tell bnd where to put the generated bundle'. And this is where I get confused, because I have not worked with Ant before, and plan to use Maven beyond this example. I am hoping someone can explain what the example is asking me to do. The text is as follows (on page 209 of ch 6): ``` First, comment out the jar task: <!-- jar jarfile="jedit.jar" manifest="org/gjt/sp/jedit/jedit.manifest" compress="false"> ... </jar --> The first line above shows where to put the JAR file, and the second lists fixed manifest entries. Next, add the bnd definition and target task: <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="../../../lib/bnd-0.0.384.jar" /> <bnd classpath="${build.directory}" files="jedit-mega.bnd" /> Here, you first give the location of the bnd JAR file to tell Ant where it can find the bnd task definition. Then you specify a bnd task to create your bundle JAR file, giving it the project class path and the file containing your bnd instructions....The first thing you must add is an instruction to tell bnd where to put the generated bundle: -output: jedit.jar The bnd task can also copy additional manifest headers into the final manifest, so let’s ask bnd to include the original jEdit manifest rather than duplicate its content in your new file: -include: org/gjt/sp/jedit/jedit.manifest ``` Basically, I have no idea what to do with the -output and the -include. My edits so far are as follows: ![jEdit build.xml screenshot](https://i.stack.imgur.com/5JMJL.png)
Editing the ant build.xml file for an OSGi example - not understanding the instruction
CC BY-SA 3.0
null
2011-05-03T16:08:25.933
2011-05-03T16:48:13.537
null
null
259,645
[ "ant", "osgi" ]
5,872,453
1
null
null
4
7,117
I'm trying to put a custom view inside a `UITableViewCell` which of course lives within a `UITableView`. I want to make this custom view accessible so I need to make it a `UIAccessibilityContainer` (since it contains several visual elements that aren't implemented as their own UIViews). When I do this, the location of the elements get all messed up whenever the table scrolls. While paging through the elements using VoiceOver, it will automatically scroll the table to attempt to center the selected element on screen, but then the outline of where VoiceOver thinks the element is no longer lines up with where it is visually. ![broken](https://i.stack.imgur.com/Jr7a9.png) My thought is that I might have to use `UIAccessibilityPostNotification()` to post a layout change when the table view scrolls, but I don't have to do that when I don't use a `UIAccessibilityContainer` and it feels like I shouldn't have to do it and that the system should be handling this for me - but the fact that `UIAccessibilityElement` needs to have it's `accessibilityFrame` set in screen coordinates does seem to throw a wrinkle into things. (Bonus question: Why the heck is the API designed that way? Why not define the frame relative to the element's container or something like that? Arg.) Here's the custom view's implementation just in case there's something in here which is causing the problem. For the full project (Xcode 4), [click here](http://dl.dropbox.com/u/545670/AccessibilityTest/AccessibilityTest.zip). ``` @implementation CellView @synthesize row=_row; - (void)dealloc { [_accessibleElements release]; [super dealloc]; } - (void)setRow:(NSInteger)newRow { _row = newRow; [_accessibleElements release]; _accessibleElements = [[NSMutableArray arrayWithCapacity:0] retain]; for (NSInteger i=0; i<=_row; i++) { UIAccessibilityElement *element = [[UIAccessibilityElement alloc] initWithAccessibilityContainer:self]; element.accessibilityValue = [NSString stringWithFormat:@"Row %d, element %d", _row, i]; [_accessibleElements addObject:element]; [element release]; } [self setNeedsDisplay]; } - (void)drawRect:(CGRect)rect { [[UIColor lightGrayColor] setFill]; UIRectFill(self.bounds); [[UIColor blackColor] setFill]; NSString *info = [NSString stringWithFormat:@"Row: %d", _row]; [info drawAtPoint:CGPointZero withFont:[UIFont systemFontOfSize:12]]; [[[UIColor whiteColor] colorWithAlphaComponent:0.5] setFill]; NSInteger x=0, y=0; for (NSInteger i=0; i<=_row; i++) { CGRect rect = CGRectMake(12+x, 22+y, 30, 30); UIAccessibilityElement *element = [_accessibleElements objectAtIndex:i]; element.accessibilityFrame = [self.window convertRect:[self convertRect:rect toView:self.window] toWindow:nil]; UIRectFill(rect); x += 44; if (x >= 300) { x = 0; y += 37; } } } - (BOOL)isAccessibilityElement { return NO; } - (NSInteger)accessibilityElementCount { return [_accessibleElements count]; } - (id)accessibilityElementAtIndex:(NSInteger)index { return [_accessibleElements objectAtIndex:index]; } - (NSInteger)indexOfAccessibilityElement:(id)element { return [_accessibleElements indexOfObject:element]; } @end ``` : I should note that I've tried variations that update the element's `accessibilityFrame` in `-indexOfAccessibilityElement:` and `-accessibilityElementAtIndex:` with the idea that VoiceOver will request the element somehow whenever it needs it and that'd be a nice time to update things. However that doesn't seem to work, either. I was kind of hoping maybe VoiceOver would automatically request things to redraw, but that also doesn't seem to work. (The idea of putting the location setting code in `-drawRect:` comes from something I remember seeing at WWDC about this, but it was unclear to me if that was "best practice" or just happened to be convenient.)
UIAccessibilityContainer in a table view
CC BY-SA 3.0
0
2011-05-03T16:12:44.547
2011-11-21T09:27:52.027
2011-05-04T13:56:55.640
177,379
177,379
[ "iphone", "objective-c", "cocoa-touch", "uikit", "accessibility" ]
5,872,504
1
6,069,354
null
1
58
I need to have a textbox (sort of) where the user can enter text and drop "tags" in ir from a list. So, for example you can end having: "This is a <<>> and this is not." What I need to achieve is that the tag, being part of the text, shouldn't be modified, just deleted. The tag should have a certain styling like a green pill or something (like Gmail labels for instance). I mean, I can implement the text conversin of what the user droped into the textbox, but this can then be modified. This is a WinForms application in .NET 2.0 or higher. ![enter image description here](https://i.stack.imgur.com/dyR02.png) The problem I'm facing is that the "Diagnosis" textbox should handle text and the droped green labels. Obviously this is not a normal textbox... so I can imagine how to handle user text input and the labels. I have seen this in some expression editors over there where once the label is placed you cannot edit its text just deleting it (it behaves like a single character). Thanks in advance! If you know about this for ASP.NET MVC is also appreciated as a WebUI is closer too.
How to handle text with dragable tags in it?
CC BY-SA 3.0
null
2011-05-03T16:17:11.813
2011-05-20T08:31:26.147
2011-05-07T17:31:12.893
7,720
7,720
[ ".net", "asp.net-mvc", "desktop-application" ]
5,872,530
1
5,874,292
null
34
49,998
im trying to get images displayed in a GridView and get the columns automatically set, so far I've had to manually set the number of columns which is not what i want to do as this will affect how big the images are on different sized screens. I ahve tried setting it to auto_fit but it only displays 2 columns in the middle of the screen. This is what im trying to achieve: (Each red square represents an image) ![enter image description here](https://i.stack.imgur.com/l5LVN.png) then when turned to landscape mode i want the columns to auto fit so that its all even. Any help would be much appreciated, thank you :)
GridView auto fit images
CC BY-SA 3.0
0
2011-05-03T16:19:55.490
2012-05-12T19:38:12.950
null
null
720,394
[ "android", "gridview" ]
5,872,670
1
5,872,709
null
3
1,223
In my asp.net page I'm making a copy of a file from my local drive to the server. ``` 'append the name to the id number and generate the file name strFileName = System.Configuration.ConfigurationManager.AppSettings("strAttachmentsPath") & l.ToString & "_" & CType(Session("FileName"), String) 'upload the file 'FileUpload1.SaveAs(strFileName) System.IO.File.Copy(CType(Session("Attachment"), String), strFileName, True) ``` `strFileName` contains a server path like `"\\myServer\images\theNewFileName.jpg"` `Session("Attachment")` contains my local path `'C:\Users\myUser\Desktop\AccountsFrance.txt'` But when I run this code asp.net throws an exception: But I can browse to this file easily.... I dont understand why this is happening :( ![enter image description here](https://i.stack.imgur.com/9Yqzx.gif)
Directory Not Found Exception...yet I can browse to the directory?
CC BY-SA 3.0
null
2011-05-03T16:30:49.513
2011-06-24T19:53:22.590
2011-06-24T19:53:22.590
168,703
255,446
[ "asp.net", "vb.net" ]
5,872,808
1
6,658,922
null
12
4,920
I have crazy problem with xcode 4 when ever I want build and run my app IF the simulator be open xcode crashes !!!!! I never had this problem , I unistall the xcode 4.0 and then install new version 4.0.2 but still has this problem ! ![enter image description here](https://i.stack.imgur.com/jEVjY.png) ``` ASSERTION FAILURE in /SourceCache/IDEKit/IDEKit-303/Framework/Classes/Workspace/IDEWorkspaceTabController.m:2327 Details: Assertion failed: [suppressionTargetValue isEqualToString:_kUserDefaults_IDESuppressStopExecutionWarningTargetValue_Add] Object: <IDEWorkspaceTabController: 0x201464400> Method: -_showWarningForBuild:forOtherExecution:trackersToStop:taskActionBlock: Thread: <NSThread: 0x200020700>{name = (null), num = 1} Hints: None Backtrace: 0 0x0000000100949773 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit) 1 0x000000010006d394 _DVTAssertionFailureHandler (in DVTFoundation) 2 0x0000000100931e02 -[IDEWorkspaceTabController _showWarningForBuild:forOtherExecution:trackersToStop:taskActionBlock:] (in IDEKit) 3 0x00000001008e830b -[IDEWorkspaceTabController _performContextTask:command:commandName:] (in IDEKit) 4 0x00007fff88486e9a -[NSApplication sendAction:to:from:] (in AppKit) 5 0x00000001001cf63c -[DVTApplication sendAction:to:from:] (in DVTKit) 6 0x000000010085b656 -[IDEApplication sendAction:to:from:] (in IDEKit) 7 0x00007fff884ab41e -[NSMenuItem _corePerformAction] (in AppKit) 8 0x00007fff884ab188 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit) 9 0x00007fff88490e09 -[NSMenu performKeyEquivalent:] (in AppKit) 10 0x00007fff8848fbb1 -[NSApplication _handleKeyEquivalent:] (in AppKit) 11 0x00007fff88360645 -[NSApplication sendEvent:] (in AppKit) 12 0x000000010085b36e -[IDEApplication sendEvent:] (in IDEKit) 13 0x00007fff882f74da -[NSApplication run] (in AppKit) 14 0x00007fff882f01a8 NSApplicationMain (in AppKit) 15 0x0000000100000eec 16 0x0000000000000002 ```
xcode crashes all the time !
CC BY-SA 3.0
0
2011-05-03T16:43:25.920
2012-09-29T04:43:43.580
null
null
319,097
[ "xcode" ]
5,872,846
1
null
null
5
6,252
I am trying to set up a report that queries for data within five minutes of each other. This way, I can recognize that one of my machines is down. This is what I have so far: ``` SELECT A_M_DEVICE.M_Device_ID, A_M_DEVICE.Machine_Name, A_M_DEVICE.IP_Address, A_M_DEVICE.Device_Type, A_M_DEVICE.M_Device_Status_ID, A_M_DEVICE.Status_Date, S_M_DEVICE_STATUS.M_Device_Status_Desc, A_M_DEVICE.Domain_Name FROM MConsole.dbo.A_M_DEVICE A_M_DEVICE INNER JOIN MConsole.dbo.S_M_DEVICE_STATUS S_M_DEVICE_STATUS ON (A_M_DEVICE.M_Device_Status_ID = S_M_DEVICE_STATUS.M_Device_Status_ID) WHERE (A_M_DEVICE.Machine_Name IN ('DeVA', 'DevB', )) AND (A_M_DEVICE.Status_Date = DateDiff (Second) <= 300) ``` Image not allowed since I am a newbie. Else I would have posted one. Alright - looks like I have enough reputations for a screenshot! ![enter image description here](https://i.stack.imgur.com/TrDMw.png) Any help, as always, will be highly appreciated. Thank you in advance.
SQL Query for datetime within 5 minutes of each other
CC BY-SA 3.0
null
2011-05-03T16:47:30.050
2011-05-03T21:41:49.120
2011-05-03T18:03:14.833
684,899
684,899
[ "sql", "sql-server" ]
5,872,921
1
null
null
3
1,145
I opened my rails project in MacVim using: ``` cd ~/development/book-examples/agile_web_dev_rails/worked_examples/depot mvim . ``` I'm trying to use Command-T to find `./test/fixtures/products.yml`; however, I'm having no success. The screenshot below shows that: 1. NERDTree can see ./test/fixtures/products.yml 2. Typing test/ into Command-T doesn't even show the fixtures directory Any thoughts on why `fixtures/products.yml` isn't found by Command-T? ![Command-T Results](https://i.stack.imgur.com/wxRxI.png) ## Update If I open just the `test` directory in MacVim instead of the entire Rails project using: ``` cd ~/development/book-examples/agile_web_dev_rails/worked_examples/depot/test mvim . ``` Then, Command-T is able to find `fixtures/products.yml`.
Why doesn't Command-T in MacVim find a file?
CC BY-SA 3.0
0
2011-05-03T16:54:24.620
2011-06-21T13:14:34.680
null
null
95,592
[ "vim", "macvim" ]
5,873,157
1
5,889,190
null
5
4,725
I'm creating a borderless form and I want to add a custom border to it. When I add the background for the form however, it doesn't show well, and it is not transparent. This is what I want to use as my border.: ![Screenshot](https://i.stack.imgur.com/NVcHx.png) When I set the Form's transparency for White the shadow disappears, I'm not sure what to do.
C# transparent border for borderless form
CC BY-SA 3.0
0
2011-05-03T17:15:05.473
2011-05-04T20:00:28.667
2011-05-03T17:18:35.473
604,889
604,889
[ "c#", "winforms", "forms" ]
5,873,723
1
null
null
0
2,779
Hi, How can I auto populate the data from db by dropdown selected? and my dropdown result already appear as well, the code as following: ``` <?php echo '<tr> <td>'.$customer_data.'</td> <td><select name="customer_id" id="customer_id" onchange="getCustomer();">'; foreach ($customers as $customer) { if ($customer['customer_id'] == $customer_id) { echo '<option value="'.$customer['customer_id'].'" selected="selected">'.$customer['name'].'</option>'; } else { echo '<option value="'.$customer['customer_id'].'">'.$customer['name'].'</option>'; } } echo '</select> </td> </tr>'; ?> ``` has html view code as ``` <select name="customer_id" id="customer_id" onchange="getCustomer();"> <option value="8">admin</option> <option value="6">customer1</option> <option value="7" selected="selected">FREE</option> </select> ``` now if one of dropdown selected i want another e.g. `<?php echo $firstname; ?>, <?php echo $lastname; ?>` appear in ``` <tr> <td><div id="show"></div></td> </tr> ``` that based on customer id/name selected to do that i try to use json call as following: ``` <script type="text/javascript"><!-- function getCustomer() { $('#show input').remove(); $.ajax({ url: 'index.php?p=customer/customers&customer_id=' + $('#customer_id').attr('value'), dataType: 'json', success: function(data) { for (i = 0; i < data.length; i++) { $('#show').append('<input type="text" name="customer_id" value="' + data[i]['customer_id'] + '" /><input type="text" name="firstname" value="' + data[i]['firstname'] + '" />'); } } }); } getCustomer(); //--></script> ``` the php call json placed at customer.php with url index.php?p=page/customer) ``` public function customers() { $this->load->model('account/customer'); if (isset($this->request->get['customer_id'])) { $customer_id = $this->request->get['customer_id']; } else { $customer_id = 0; } $customer_data = array(); $results = $this->account_customer->getCustomer($customer_id); foreach ($results as $result) { $customer_data[] = array( 'customer_id' => $result['customer_id'], 'name' => $result['name'], 'firstname' => $result['firstname'], 'lastname' => $result['lastname'] ); } $this->load->library('json'); $this->response->setOutput(Json::encode($customer_data)); } ``` and the db ``` public function getCustomer($customer_id) { $query = $this->db->query("SELECT DISTINCT * FROM " . DB_PREFIX . "customer WHERE customer_id = '" . (int)$customer_id . "'"); return $query->row; } ``` but i get the wrong return as following ![enter image description here](https://i.stack.imgur.com/mzapz.png) is there someone please how to solved it to more better? thanks in advance
auto populate data with dropdown
CC BY-SA 3.0
null
2011-05-03T18:04:28.523
2011-05-05T09:09:20.850
2011-05-05T08:42:39.717
566,646
566,646
[ "php", "text", "drop-down-menu", "field", "populate" ]
5,874,446
1
5,875,578
null
2
305
I have this really strange problem. When I try to create a strongly typed view, I get really alot of classes that have nothing to do with the project. I tried to clean the solution and rebuild. here is a screenshot: ![all classes in strongly typed view](https://i.stack.imgur.com/Yj4xP.png)
Visual studio MVC3 Strongly typed Views shows everything
CC BY-SA 3.0
null
2011-05-03T19:13:18.520
2011-05-03T20:52:07.827
null
null
47,603
[ "c#", "visual-studio-2010", "model-view-controller", "asp.net-mvc-3" ]
5,874,552
1
5,874,585
null
28
26,525
I use GVim on Windows 7. I want to learn how to put newline characters by using regex substitutions. To do this I try to use \r and \n metacharacters but the substituted text doesn't show normal newlines. For example, at the beginning I have: ``` line 1 line 2 ``` ![Before substitution](https://i.stack.imgur.com/3Y1Nt.png) I use the following substitution expression: ``` :%s/\n/\n\n/g ``` Then GVim produces the following text: ``` line 1^@^@line 2^@^@ ``` ![After substitution with \n as newline characters](https://i.stack.imgur.com/Ci0BK.png) Instead, if I use \r\n in the substitution expression ``` :%s/\n/\r\n/g ``` Then GVim produces the following text: ``` line 1 ^@line 2 ^@ ``` ![After substitution with \r\n as newline](https://i.stack.imgur.com/xcbzB.png) What are those ^@ characters? How to use newline characters in the substitution expression properly?
How to Put Newline Characters in Substitutions of Regular Expressions of GVim
CC BY-SA 3.0
0
2011-05-03T19:24:13.750
2015-10-15T22:36:18.877
2011-05-03T19:47:31.070
29,246
29,246
[ "regex", "vim", "newline", "substitution" ]
5,874,655
1
5,875,281
null
4
2,775
following situation. i have an app that uses a UINavigationController for navigating. For a push of a special Navigation Controller i want a custom Animation, a zoom out. What i have is looking good so far, the only problem is, that the "old" Viewcontroller disappears before the animation starts, so the new viewcontroller zooms out of "nothing" instead of viewing the old viewcontroller in the background. For better viewing i created a simple sample app: [download](http://dl.dropbox.com/u/80699/animateTest.zip) ![enter image description here](https://i.stack.imgur.com/EOVTy.png)![enter image description here](https://i.stack.imgur.com/uPeUy.png)![enter image description here](https://i.stack.imgur.com/0LY0e.png) Does anybody know, how to animate the new viewcontroller (image3) that the old view controller(image1) stays in the background while animating (image 2)? ``` /* THIS CANNOT BE CHANGED */ AnimatedViewController *animatedViewController = [[AnimatedViewController alloc] initWithNibName:@"AnimatedViewController" bundle:nil]; /* THIS CAN BE CHANGED */ animatedViewController.view.transform = CGAffineTransformMakeScale(0.01, 0.01); [UIView beginAnimations:@"animationExpand" context:NULL]; [UIView setAnimationDuration:0.6f]; animatedViewController.view.transform=CGAffineTransformMakeScale(1, 1); [UIView setAnimationDelegate:self]; [UIView commitAnimations]; /* THIS CANNOT BE CHANGED */ [self.navigationController pushViewController:animatedViewController animated:NO]; ``` Additional information: my app isn't that simple. i use three20 framework for my app but the pushing and creating of the view controllers is simply what three20 does. i only can hook into the part between (`THIS CAN BE CHANGED` in my code). i cannot change the code before and after this (except with a lot of researching).
Animating UIView while pushing a UINavigationController
CC BY-SA 3.0
0
2011-05-03T19:33:49.047
2011-05-03T20:32:26.540
null
null
253,288
[ "iphone", "ios", "animation", "uiviewcontroller", "uinavigationcontroller" ]
5,874,641
1
5,875,126
null
0
517
I am trying to display data from an SQLite database in a dialog. The data is a list of scores. All works well until I add a totals line and then it goes real haywire. This is the source: ``` DBAdaptor dbAdaptor; Cursor scoresCursor; Cursor totalsCursor; //ScoresDisplayerAdaptor scoresDisplayerAdaptor; dbAdaptor = new DBAdaptor(this); dbAdaptor.open(); scoresCursor = dbAdaptor.getScores(); totalsCursor = dbAdaptor.getTotalScores(); startManagingCursor(scoresCursor); startManagingCursor(totalsCursor); //scoresDisplayerAdaptor = new ScoresDisplayerAdaptor(this,scoresCursor); final Dialog dialog = new Dialog(this); dialog.setContentView(R.layout.scores); ListView lv = (ListView)dialog.getWindow().findViewById(R.id.lvwScores); ((TextView) dialog.findViewById(R.id.tvwPlayer1Name)).setText(players[0].playerName); ((TextView) dialog.findViewById(R.id.tvwPlayer2Name)).setText(players[1].playerName); switch (settings.getNumberOfPlayers()) { case 2: lv.setAdapter(new SimpleCursorAdapter(this, R.layout.playerscoresrow, scoresCursor, new String[] {DBAdaptor.KEY_PLAYER1_SCORE,DBAdaptor.KEY_PLAYER2_SCORE}, new int[] {R.id.tvwPlayer1Score, R.id.tvwPlayer2Score } )); break; case 3: ((TextView) dialog.findViewById(R.id.tvwPlayer3Name)).setText(players[2].playerName); lv.setAdapter(new SimpleCursorAdapter(this, R.layout.playerscoresrow, scoresCursor, new String[] {DBAdaptor.KEY_PLAYER1_SCORE,DBAdaptor.KEY_PLAYER2_SCORE, DBAdaptor.KEY_PLAYER3_SCORE}, new int[] {R.id.tvwPlayer1Score, R.id.tvwPlayer2Score, R.id.tvwPlayer3Score} )); break; case 4: ((TextView) dialog.findViewById(R.id.tvwPlayer3Name)).setText(players[2].playerName); ((TextView) dialog.findViewById(R.id.tvwPlayer4Name)).setText(players[3].playerName); lv.setAdapter(new SimpleCursorAdapter(this, R.layout.playerscoresrow, scoresCursor, new String[] {DBAdaptor.KEY_PLAYER1_SCORE,DBAdaptor.KEY_PLAYER2_SCORE, DBAdaptor.KEY_PLAYER3_SCORE,DBAdaptor.KEY_PLAYER4_SCORE}, new int[] {R.id.tvwPlayer1Score, R.id.tvwPlayer2Score, R.id.tvwPlayer3Score, R.id.tvwPlayer4Score } )); } /* lv.setAdapter(new SimpleCursorAdapter(this, R.layout.scores, totalsCursor, new String[] {DBAdaptor.KEY_PLAYER1_TOTAL,DBAdaptor.KEY_PLAYER1_TOTAL, DBAdaptor.KEY_PLAYER1_TOTAL,DBAdaptor.KEY_PLAYER1_TOTAL}, new int[] {R.id.tvwPlayer1Total, R.id.tvwPlayer2Total, R.id.tvwPlayer3Total, R.id.tvwPlayer4Total } ));*/ dialog.setTitle("Scores"); Button aButton = (Button)dialog.findViewById(R.id.btnOK); aButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { // TODO Auto-generated method stub dialog.dismiss(); askNewHand(); } }); dialog.show(); dbAdaptor.close(); ``` Where the two cursors are: ``` public Cursor getScores(long rowId) throws SQLException { Cursor mCursor = db.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_PLAYER1_SCORE, KEY_PLAYER2_SCORE, KEY_PLAYER3_SCORE, KEY_PLAYER4_SCORE }, KEY_ROWID + "=" + rowId, null, null, null, null, null); if (mCursor != null) { mCursor.moveToFirst(); } return mCursor; } public Cursor getTotalScores() { return db.rawQuery( "SELECT 0 as _id, SUM(" + KEY_PLAYER1_SCORE + ") as " + KEY_PLAYER1_TOTAL + ", " + "SUM(" + KEY_PLAYER2_SCORE + ") as " + KEY_PLAYER2_TOTAL + ", " + "SUM(" + KEY_PLAYER3_SCORE + ") as " + KEY_PLAYER3_TOTAL + ", " + "SUM(" + KEY_PLAYER4_SCORE + ") as " + KEY_PLAYER4_TOTAL + " " + "FROM " + DATABASE_TABLE,null); } ``` The main XML looks like this: ``` <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content"> <LinearLayout android:id="@+id/lloPlayerNames" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <TextView android:id="@+id/tvwPlayer1Name" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="14.5sp"/> <TextView android:id="@+id/tvwPlayer2Name" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="14.5sp"/> <TextView android:id="@+id/tvwPlayer3Name" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="14.5sp"/> <TextView android:id="@+id/tvwPlayer4Name" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="14.5sp"/> </LinearLayout> <Button android:id="@+id/btnOK" android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_weight="1" android:text="OK" android:layout_centerHorizontal="true" android:layout_alignParentBottom="true" /> <LinearLayout android:id="@+id/lloTotalScores" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_above="@id/btnOK"> <TextView android:id="@+id/tvwPlayer1Total" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <TextView android:id="@+id/tvwPlayer2Total" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <TextView android:id="@+id/tvwPlayer3Total" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content"/> <TextView android:id="@+id/tvwPlayer4Total" android:layout_weight="1" android:gravity="right" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginRight="14.5sp"/> </LinearLayout> <ListView android:id="@+id/lvwScores" android:layout_below="@id/lloPlayerNames" android:layout_above="@id/lloTotalScores" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_centerHorizontal="true" /> </RelativeLayout> ``` As long as the lines filling the totals are commented out then the screen displayed is ok: ![enter image description here](https://i.stack.imgur.com/fBDmR.jpg) However, as soon as I un-comment those lines to display the total I get this: ![enter image description here](https://i.stack.imgur.com/ZkmZU.jpg)
Android dialog not displaying data sqlite
CC BY-SA 3.0
null
2011-05-03T19:32:25.063
2011-05-04T13:40:13.410
null
null
648,746
[ "android", "sqlite", "dialog" ]
5,874,743
1
5,889,075
null
3
2,810
Rephrasing the question to clarify confusion. I am using XSLT and XSL:FO translated by Apache FOP. I want to print address labels. ``` <?xml version="1.0" encoding="utf-8" ?> <workOrders> <workOrder> <number>111</number> <PartNumber>110022</PartNumber> <col3>222</col3> <Qty>333</Qty> </workOrder> <workOrder> <number>111</number> <PartNumber>110022</PartNumber> <col3>222</col3> <Qty>333</Qty> </workOrder> <!--Manually copy/paste the workOrder until you have 47 of them..--> </workOrders> ``` Page 1 (full page 6 rows x 3 cols) ![Page1](https://i.stack.imgur.com/7DDCP.gif) Page 2 is same as page 1. Page 3 (partial page...in this case 4 rows x 3 columns and last item blank) ![Page3](https://i.stack.imgur.com/z8KrZ.gif) --- I plugged in Alejandro's solution. I'm getting an error reported by Apache FOP saying > xsl:template is not allowed in this position in the stylesheet Here's the code translated from the HTML stuff to the XSL:FO. The point of error is marked by comment. What did I screw up? ``` <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <!-- layout for the first page --> <fo:simple-page-master master-name="first" page-height="11in" page-width="8.5in" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"> <fo:region-body margin-top="0cm"/> <fo:region-before extent="1cm"/> <fo:region-after extent="0cm"/> </fo:simple-page-master> <!-- layout for the other pages --> <fo:simple-page-master master-name="rest" page-height="11in" page-width="8.5in" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm"> <fo:region-body margin-top="0cm"/> <fo:region-before extent="1cm"/> <fo:region-after extent="0cm"/> </fo:simple-page-master> <fo:page-sequence-master master-name="basicPSM" > <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="first" page-position="first" /> <fo:conditional-page-master-reference master-reference="rest" page-position="rest" /> <!-- recommended fallback procedure --> <fo:conditional-page-master-reference master-reference="rest" /> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> </fo:layout-master-set> <!-- end: defines page layout --> <!-- actual layout --> <fo:page-sequence master-reference="basicPSM"> <fo:flow flow-name="xsl-region-body"> <xsl:template match="/" name="tables"><!--ERROR REFERS TO HERE--> <xsl:param name="pRows" select="3"/> <xsl:param name="pColumns" select="3"/> <xsl:param name="pSequence" select="*/*"/> <xsl:variable name="vSize" select="$pRows * $pColumns"/> <xsl:for-each select="$pSequence[position() mod $vSize = 1]"> <xsl:variable name="vPosition" select="position()"/> <fo:table table-layout="fixed" width="63mm" border-collapse="separate" wrap-option="wrap"> <fo:table-body wrap-option="wrap"> <xsl:call-template name="rows"> <xsl:with-param name="pSequence" select="$pSequence[ position() > ($vPosition - 1) * $vSize and $vPosition * $vSize + 1 > position() ]"/> </xsl:call-template> </fo:table-body> </fo:table> </xsl:for-each> </xsl:template> <xsl:template name="rows"> <xsl:param name="pSequence" select="/.."/> <xsl:param name="pRow" select="$pRows"/> <xsl:if test="$pRow"> <xsl:call-template name="rows"> <xsl:with-param name="pSequence" select="$pSequence"/> <xsl:with-param name="pRow" select="$pRow - 1"/> </xsl:call-template> <fo:table-row wrap-option="wrap"> <xsl:call-template name="columns"> <xsl:with-param name="pSequence" select="$pSequence[ position() > ($pRow - 1) * $pColumns and $pRow * $pColumns + 1 > position() ]"/> </xsl:call-template> </fo:table-row> </xsl:if> </xsl:template> <xsl:template name="columns"> <xsl:param name="pSequence" select="/.."/> <xsl:param name="pColumn" select="$pColumns"/> <xsl:if test="$pColumn"> <xsl:call-template name="columns"> <xsl:with-param name="pSequence" select="$pSequence"/> <xsl:with-param name="pColumn" select="$pColumn - 1"/> </xsl:call-template> <fo:table-cell width="90mm"> <fo:block wrap-option="wrap"> <xsl:apply-templates select="$pSequence[$pColumn]"/> </fo:block> </fo:table-cell> </xsl:if> </xsl:template> <xsl:output method="xml"/> <xsl:template match="/"> <xsl:call-template name="tables"> <xsl:with-param name="pSequence" select="workOrders/workOrder[position()!=1]"/> </xsl:call-template> </xsl:template> <xsl:template match="workOrder"> <xsl:value-of select="PartNumber"/> </xsl:template> </fo:flow> </fo:page-sequence> </fo:root> </xsl:stylesheet> ```
XSLT - Produce address labels
CC BY-SA 3.0
null
2011-05-03T19:40:19.747
2011-05-04T19:50:30.097
2011-05-04T17:38:57.760
87,796
87,796
[ "xslt", "xsl-fo", "apache-fop" ]
5,875,041
1
5,875,882
null
3
15,084
I'm working on a finger-print device, the manufacture (Upek) gave me a c++ BSAPI.dll so I need to use wrappers to get this to work in .net. I'm able to work with it all from in-memory, I could grab and match the finger prints. Now I'm stuck trying to get the data out to a file and then loading it back in to memory and get the IntPtr. [Here](http://pastebin.com/tzHchYCL) there's a c++ sample on how to export and import from a file. but I don't know how to read it. Any help is appreciated Thanks all --- This is what I have and works great: ![enter image description here](https://i.stack.imgur.com/wr3KF.png) Now I need two things 1. Take that bufBIR save it to a database. 2. Take the data I saved and pass it in to the abs_verify. How can this be done?
How can I get IntPtr pointer from object
CC BY-SA 3.0
0
2011-05-03T20:04:55.830
2013-07-01T09:34:40.860
2013-07-01T09:34:40.860
512,251
675,516
[ ".net", "c++", "fingerprint", "intptr" ]
5,875,337
1
5,875,442
null
3
303
I have a table with a composite primary key: ``` table MyTable ( some_id smallint not null, order_seq smallint not null, --other columns ) ``` ...where `some_id` and `order_seq` make up a composite primary key. The `order_seq` column is used to determine the display order in other parts of my C# 3.5/ASP.NET application. I'm setting up an admin page where users can shuffle these rows around, changing multiple rows' `order_seq` values at a time: ![screenshot](https://i.stack.imgur.com/6nPnJ.jpg) `some_id` When the user clicks Submit, the new `order_seq` values are supposed to be saved to the database. My problem is that `order_seq` is part of the PK, so the task of shuffling these things around becomes complicated. Since `some_id` is the same, I have no way of identifying them other than `order_seq` itself, which changes as I go. Furthermore, I have to make sure the `order_seq` values stay unique (presumably with some kind of temp value). The best idea I have is to use some kind of in-memory collection to keep track of the changes I've made so far. I'm having trouble implementing it, though. How can I do an in-place resequence of multiple rows at once? I'd be fine with either a C# or SQL-based solution. and limited control over the DB in general. I won't be able to change the PK scheme or introduce any new columns.
In-place resequence of a primary-key column
CC BY-SA 3.0
null
2011-05-03T20:31:36.087
2011-05-03T22:19:14.427
2011-05-03T22:19:14.427
399,649
399,649
[ "c#", "sql", "sql-server-2008", "ado.net" ]
5,875,615
1
5,875,650
null
0
2,106
Fairly simple problem, I have a table in a database that contains one column and fourteen rows. When trying to return all of the rows in the database I try the following: ``` command = new SQLiteCommand("SELECT Value FROM Currency", connection); ``` Yet when I look at the amount of results affected (And the lack of elements in my array) I notice the following: ![Huh](https://i.stack.imgur.com/DSLOt.png) Apparently there's nothing in there, I've even checked with two seperate tools that confirm the data is in there. Am I executing this incorrectly? I simply want to iterate over the values returned and store them in an array. Thanks for your time! Edit: Solution! ``` int i = 0; while (dReader.Read()) { _data[i] = Convert.ToSingle(dReader[0]); i++; } ``` This works fine :)
SQLite Select statement returns nothing - C#
CC BY-SA 3.0
null
2011-05-03T20:56:05.380
2011-05-03T22:22:15.760
2011-05-03T22:22:15.760
218,159
218,159
[ "c#", "select", "system.data.sqlite" ]
5,875,795
1
5,886,371
null
10
549
I'm sure I'm doing something wrong; but this has been driving me crazy for a while now. I've made a small Silverlight game (an old Galaxian clone). When the game starts ~90% of the time, a bunch of stars are randomly positioned in the game area. There are three types of stars - bigger stars more faster, smaller stars move slower. It looks like this: ![ScreenShot1](https://i.stack.imgur.com/TcO0F.png) ~10% of the time all of the stars appear in 'bands' ![ScreenShot2](https://i.stack.imgur.com/zkav1.png) I think it's worth mentioning that even though they are in narrow bands; they aren't all in the same exact position. So it's like it is still generating a random number - just a tiny one. To reproduce the error, I simply hit 'f5' in the browser. Nearly all the time, it works as expected. Rarely, I get the bands. Hitting 'f5' again will fix the issue. Without posting a giant wall of code; I think this is the most relevant code. It appears in the Base class that all of my stars inherit from. It's called once, when each star is created. ``` Protected Sub SetInitialPosition() myElipse.Height = GetStarSize() myElipse.Width = GetStarSize() _location.X = GetRandom.Next(-1 * Settings.StarEdge, CType(GameCanvas.Width, Integer) + Settings.StarEdge) _location.Y = GetRandom.Next(0, CType(GameCanvas.Height, Integer)) myElipse.Fill = New SolidColorBrush(GetStarColor) End Sub ``` I don't see anything wrong. GetRandom() returns a singleton Random class, and I'm depending on the GameCanvas.Height and GameCanvas.Width being valid - but again, the .Width appears to work exactly as expected. Does anyone have a potential explanation for this behavior? Are there any gotchas to watch out for when generating random numbers? Every time I step through the code, everything is fine and the game works as expected. If it would help I can post a link to the game. ([http://robdude.weebly.com/cci.html](http://robdude.weebly.com/cci.html)) Here is the code from GetRandom() ``` Protected Shared Function GetRandom() As Random If _random Is Nothing Then _random = New Random() Return _random End Function ``` I really appreciate everyones thoughts/advice on this.
Weird Random Number Bug In .Net
CC BY-SA 3.0
null
2011-05-03T21:14:55.593
2011-05-04T16:17:42.370
2011-05-04T16:17:42.370
73,381
73,381
[ ".net", "vb.net", "silverlight", "random" ]
5,875,874
1
5,914,842
null
1
962
We have a TFS 2010 project (MSF Agile v5.0 template) project, the SSRS reports for burndown allow us to specify start and end dates for the current iteration, but the project portals excel charts parts for burndown do not seem to have that option anywhere I can find it. ![An example Excel burndown chart with incorrect itteration dates](https://i.stack.imgur.com/GR5co.png) Can anyone explain how I can configure the portal's excel burndown chart to have the begin and end dates rather than the defaults?
How can I change the dates used in TFS 2010 SharePoint portal's burndown excel chart?
CC BY-SA 3.0
null
2011-05-03T21:23:18.617
2020-07-18T02:42:52.620
2020-07-18T02:42:52.620
3,744,182
595,787
[ "excel", "tfs" ]
5,876,037
1
5,876,061
null
6
15,417
I want to select rows from DataTable. Select criteria includes anding and the columns name have a space b/w them as you can see below: ``` int distributionLineIdex = import.VendorInvoiceLineDetailTable.Select ("Number='AMEX0311_00011' and Line number='001'").Count(); ``` I am getting the following exception : ``` Syntax error: Missing operand after 'number' operator. ``` ![enter image description here](https://i.stack.imgur.com/wI0DP.jpg) What am I missing here ?
Linq :DataTable select does not work if column name has space in it?
CC BY-SA 3.0
null
2011-05-03T21:38:20.400
2011-06-22T21:39:40.390
null
null
389,288
[ "c#", ".net", "linq", "ado.net", "datatable" ]
5,876,160
1
5,876,247
null
0
157
I'm using Netbeans, and trying to get a program "Rational" to run, so that I can see what needs to be fixed. However, when I try to run it, I get the error "Rational.Main class wasn't found in Rational project". I've tried renaming several aspects of the program to make it see the main class (it is there, I assure you), but it still gives this error. I've seen it before, but this is the only time it hasn't seemed to fix itself in time. Edit: This is more problematic than I thought, here's the updated code. Yes, it's very wrong. ``` package Rational; public class Rational { int x, y; public Rational () { this.x = 0; this.y = 0; } public static void printRational (Rational x) { System.out.println (x); } public Rational (int x, int y) { this.x = x; this.y = y; } public static void negate (int x) { x = -x; System.out.println (x); } public static void invert (int x, int y) { int g = x; x = y; y = g; System.out.print (x); System.out.print ("/"); System.out.println (y); } public static void toDouble (int x, int y) { double f = x/y; System.out.println (f); } public static int GCD(int a, int b) { if (b==0) return a; return GCD(b,a%b); } public static void reduce (int x, int y) { x = x/(GCD (x,y)); y = y/(GCD (x,y)); System.out.print (x); System.out.print ("/"); System.out.println (y); } public static void add (int x, int y) { double z = x+y; System.out.println (z); } public static void main(String args[]) { Rational g = new Rational ();{ g.x = 1; g.y = 2; System.out.println ("vgds"); //Rational.printRational (g); } } } ``` Updated screenshot: ![http://i.stack.imgur.com/SX55P.png](https://i.stack.imgur.com/SX55P.png)
Trying to correct a program, can't even get it to run
CC BY-SA 3.0
null
2011-05-03T21:50:24.600
2011-05-04T01:17:14.747
2011-05-04T01:17:14.747
731,600
731,600
[ "java", "class", "netbeans", "program-entry-point" ]
5,876,188
1
5,911,741
null
22
10,234
Given a polygon, created entirely from rectangles, and defined by an array of points, where the edges are always aligned with the axis: ![a polygon created entirely from intersecting rectangles](https://i.stack.imgur.com/nw7se.png) I am trying to determine a quick algorithm to find a small number of rectangles which can fill in this shape. This is something I did by hand to show the collection of rectangles I am describing:![a polygon created entirely from intersecting rectangles filled with non-overlapping rectangles](https://i.stack.imgur.com/zEWXB.png) Here is some simple [processing](http://processing.org) code to create this shape (well, close to it). ``` float[] xpts = {0, 50, 50, 100, 100, 150, 150, 250, 250, 300, 300, 325, 325, 300, 300, 250, 250, 210, 210, 250, 250, 125, 125, 25, 25, 50, 50, 0 }; float[] ypts = {100, 100, 80, 80, 10, 10, 80, 80, 75, 75, 80, 80, 200, 200, 300, 300, 275, 275, 260, 260, 200, 200, 270, 270, 165, 165, 125, 125}; void setup( ) { size( 350, 350 ); } void draw( ) { stroke( 0 ); strokeWeight( 1.5 ); float px = xpts[0]; float py = ypts[0]; for (int i=1; i < xpts.length; i++) { float nx = xpts[i]; float ny = ypts[i]; line( px, py, nx, ny ); px = xpts[i]; py = ypts[i]; } float nx = xpts[0]; float ny = ypts[0]; line( px, py, nx, ny ); } ```
filling a rectilinear polygon with rectangles
CC BY-SA 3.0
0
2011-05-03T21:52:51.110
2011-05-22T15:07:20.187
2011-05-21T19:36:08.573
62,255
62,255
[ "algorithm", "geometry" ]
5,876,229
1
6,394,203
null
8
1,097
Knowing this problem has been adressed before at [PHP update kerning problem with imagettftext() and imagefttext() functions](https://stackoverflow.com/questions/2610019/php-update-kerning-problem-with-imagettftext-and-imagefttext-functions) but witout solution; PHP5.3 seem to have kerning problems when printing text: Look at the 'x' in the following examples (font: Ubuntu-M.ttf): PHP5.2, ubuntu (good) ![enter image description here](https://i.stack.imgur.com/CcyIP.png) PHP5.3.2, ubuntu (worse, x is fattened) ![enter image description here](https://i.stack.imgur.com/Qdwne.png) PHP5.3.2, MAMP OSX (horrible) ![enter image description here](https://i.stack.imgur.com/rrDOF.png) Is there any solution to this? Anyone with 5.3.6 installed care to try this? regards, //t
kerning problem in GD and php 5.3
CC BY-SA 3.0
null
2011-05-03T21:57:54.947
2011-06-18T06:00:48.717
2017-05-23T12:03:12.217
-1
247,245
[ "php", "gd", "kerning" ]
5,876,362
1
5,887,821
null
4
32,218
In Acrobat Professional, I create multiple checkboxes and assign the same to each checkbox, but a different . With this, the checkboxes seem to behave like radio buttons: Acrobat only lets me check one of them. If the first is checked, and I click on the second one, Acrobat unchecks the first one. If I assign different names to the checkboxes, then they do behave independently. However it would make things easier for my code that fills out the form if the name could be the same. Is it possible to create non-exclusive checkboxes (i.e. real checkboxes) that have the same name in Acrobat? (For reference, this is the PDF I created: [20110503-exclusive-checkboxes.pdf](http://dl.dropbox.com/u/6900/resources/20110503-exclusive-checkboxes.pdf)) ![Same name, different export value](https://i.stack.imgur.com/pjJWa.png)
How to create non-exclusive checkboxes with the same name in an Acrobat/PDF form
CC BY-SA 3.0
null
2011-05-03T22:15:50.133
2015-05-19T13:41:40.013
null
null
5,295
[ "pdf", "acrobat" ]
5,876,491
1
5,876,999
null
0
397
When I make include <%@include file="../WEB-INF/jspf/Header.jspf" %> The images inside the header are not reachable also css files are not linked correctly !!, here's the hierarchy of my files ![enter image description here](https://i.stack.imgur.com/2rwNK.png) in StudentIndex.jsp I make like this ``` <link type="text/css" rel="stylesheet" href="../css/StudentStyle.css"/> <%@include file="../WEB-INF/jspf/Header.jspf" %> ``` and in the Header.jspf ``` <link href="../css/Style.css" type="text/css" rel="stylesheet"/> <img src="../images/iuglogo.gif" alt="IUG logo" id="IUGlogoStyle"/> ``` when I run StudentIndex.jsp, all the files are running correctly ``` http://localhost:8080/OnlineQuerySystemNew/Student/StudentIndex.jsp ``` but when the request is forwarded from the servlet to the StudentIndex page no images and no css files are attached ``` http://localhost:8080/OnlineQuerySystemNew/StudentManagementServlet?param=activationOptions ```
Problem in files paths when trying to include them into index page
CC BY-SA 3.0
null
2011-05-03T22:30:45.943
2011-05-04T11:37:59.617
2011-05-03T23:33:26.677
2,067,571
2,067,571
[ "java", "jsp", "path" ]
5,876,797
1
5,877,402
null
0
625
I am creating a dynamic tab via an "tab-add" button. The "tab-add" button is appended to the end of the tab and then the tab is initialised, e.g. ``` $('#tabs').sortable({ create: function( event, ui ) { $tabs = $( '#tabtab' ).tabs({ create: function(event, ui) { $('#tabs').append( '<li id="tab-add" class="noSort"></li>' ); }, add: function( event, ui ) { ... ``` ![enter image description here](https://i.stack.imgur.com/Q8R1e.jpg) When the "tab-add" button ( which is in fact an li ) is clicked a new tab is created using the .tabs( 'add', href, input ) notation. I then inject an input field into this generated tab li. This removes the default generated link within the newly created li. ![enter image description here](https://i.stack.imgur.com/Ls1nS.jpg) ``` <li id="tab-1"> <input type="text" id="tab-input"></input> </li> ``` ![enter image description here](https://i.stack.imgur.com/sJznk.jpg) This works fine when the input loses focus the information gathered in the input is posted to a database and the correct li syntax is returned into id "tab-1". ``` <li id="tab-1"> <a href="#tabs-1">The Name of My New Tab</a> </li> ``` Now, this is where I get stuck. The correct tab is selected (seen above) and the panel is showing, however when I click on another already created tab and then click back on my just generated tab the tab will not select (see below). When I try to click the "The Name Of My New Tab" tab it doesn't select (highlight). ![enter image description here](https://i.stack.imgur.com/WZTqU.jpg) This has something to do with the fact that the content of "tab-1" was dynamically generated and the tab has not regenerated itself. Since, if I go ahead and add another new tab the tab starts to work fine. I don't want to do a page refresh I just want that tab to work immediately after its been generated. I've tried selecting, loading and enabling the tab with no effect. Is there a slick way to regenerate the tabs after this dynamic approach? I hope this read has not been too dull! Any help would be much appreciated.
Dynamic tab in jquery fails to be selected after creation
CC BY-SA 3.0
0
2011-05-03T23:13:50.573
2011-05-04T03:01:13.973
2011-05-04T02:15:12.157
317,889
317,889
[ "jquery", "tabs", "jquery-ui-tabs", "jquery-tabs" ]
5,876,936
1
5,876,982
null
8
3,318
Safari/Chrome Developer Tools indicate that a CSS rule is overridden by something else by striking it through, as shown in the image. ![Striked-through CSS rule](https://i.stack.imgur.com/DuZmX.png) Sometimes I find myself in a situation where I can not figure out from the CSS files what causes this rule to be ignored. But surely Safari itself must know as it strikes it through. Is there a way to know what overrides such a rule?
Safari/Chrome Developer Tools debug CSS overrides
CC BY-SA 3.0
0
2011-05-03T23:36:09.227
2011-05-03T23:43:13.567
null
null
465,345
[ "safari", "google-chrome-devtools" ]
5,877,713
1
5,886,135
null
1
11,110
i'm trying to write an app for testing sensors by my Nexus S. well , i wrote this to show the sensors lists through a listview. ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //get all sensors sensorManager = (SensorManager) this.getSystemService(SENSOR_SERVICE); sensors = sensorManager.getSensorList(Sensor.TYPE_ALL); setContentView(R.layout.main); sensorListView = (ListView) findViewById(R.id.sensor_listview); sensorListView.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { showSensorInfo(sensors.get(position).getType()); } }); //set an empty adapter for ListView sensorNames = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1); for (Sensor s : sensors) { sensorNames.add(s.getName()); Log.i("sensor", s.getName()); } sensorListView.setAdapter(sensorNames); } ``` i saw this ~ ![enter image description here](https://i.stack.imgur.com/oRfAc.png) there is a sensor called 「Gravity Sensor」, my question is , there are sensors CONSTANT such as : Sensor.TYPE_ACCELEROMETER Sensor.TYPE_GYROSCOPE Sensor.TYPE_LIGHT .. . and so on .But i couldn't find a CONSTANT called 「Sensor.TYPE_GRAVITY」 where is the Gravity Sensor from =..=a?? ( i'm a really newbie~ )
how to get gravity sensor information?
CC BY-SA 3.0
null
2011-05-04T02:07:50.920
2014-03-05T07:14:09.227
null
null
422,405
[ "android" ]
5,877,770
1
5,878,190
null
0
1,049
I have a JTextpane that I had populated it from DB. The problem is when I set text, and when it's long, the JTextPane show the text from the end like in the snapshot. How can I do ?? I tried `setCursor()` but I seem it isn't the right method. ![enter image description here](https://i.stack.imgur.com/D8eBm.png)
Problem with JTextPane - cursor Position at the end
CC BY-SA 4.0
null
2011-05-04T02:23:51.173
2020-06-23T07:34:09.713
2020-06-23T07:34:09.713
604,156
604,156
[ "java", "swing", "jtextpane" ]
5,878,058
1
5,882,308
null
0
733
I currently have a 2 level tree view that displays departments and then assets within those departments. To do this I am using a sql stored procedure to prepare the data. See the attatched file to see the output of this stored procedure. ![enter image description here](https://i.stack.imgur.com/l6SJu.gif) I am wondering how to go about adding in another level. IE I want to have a tree view that started with SITE's that have Departments which have Assets. IE I want to add a grand parent to the tree view. What would the sql look like for this.
how to bind telerik tree view to multple level stored procedures
CC BY-SA 3.0
null
2011-05-04T03:09:06.147
2011-05-04T10:56:00.870
null
null
507,669
[ "treeview", "telerik" ]
5,878,286
1
5,879,372
null
2
2,742
Is there some way to draw a B+ tree in latex? It would look something like the picture below (ignoring the animations) ![Example of B+ tree](https://i.stack.imgur.com/JRcmY.gif)
draw a B+ tree in latex
CC BY-SA 3.0
null
2011-05-04T03:48:29.027
2014-03-19T16:14:58.530
null
null
575,059
[ "latex" ]
5,878,333
1
5,878,382
null
1
2,120
Hi I am getting this error : ![enter image description here](https://i.stack.imgur.com/43MfZ.jpg) My code is like this, in the : ``` private void loadCountry() { ReservationHelper reservationHelperObject = new ReservationHelper(); ViewData["countryOut"] = new SelectList(reservationHelperObject.LoadCountry()); ViewData["countryIn"] = new SelectList(reservationHelperObject.LoadCountry()); CountryOut = ((MultiSelectList)(ViewData["CountryOut"])).ToList()[0].Text; } ``` Any ideas ? Continuation of code: ``` private void loadDefaultvalues() { List<string> emptyList = new List<string>(); ViewData["locationIn"] = new SelectList(emptyList); ViewData["locationOut"] = new SelectList(emptyList); ViewData["RateProgram"] = new SelectList(emptyList); ViewData["Currency"] = new SelectList(emptyList); ViewData["VehicleClass"] = new SelectList(emptyList); ViewData["ReservationStatusDropDownList"] = new SelectList(emptyList); ViewData["Miles"] = new SelectList(emptyList); ViewData["currencyDropDownList"] = new SelectList(emptyList); ViewData["ReservationStatus"] = new SelectList(emptyList); ViewData["vehicleClassDropDownList"] = new SelectList(emptyList); ViewData["rateProgramDropDownList"] = new SelectList(emptyList); ViewData["parentOutDropDownList"] = new SelectList(emptyList); ViewData["parentInDropDownList"] = new SelectList(emptyList); ViewData["zoneOutDropDownList"] = new SelectList(emptyList); ViewData["zoneInDropDownList"] = new SelectList(emptyList); ViewData["locationOutDropDownList"] = new SelectList(emptyList); ViewData["locationInDropDownList"] = new SelectList(emptyList); ViewData["authorizationDropDownList"] = new SelectList(emptyList); ViewData["specialServiceDropDownList"] = new SelectList(emptyList); ViewData["RentalStatus"] = new SelectList(emptyList); ViewData["Status"] = new SelectList(emptyList); ViewData["Fop"] = new SelectList(emptyList); ViewData["CustomerType"] = new SelectList(emptyList); this.loadRentaStatus(); this.loadStatus(); this.loadFop(); this.loadCustomerTypes(); this.loadCountry(); this.loadReservationStatuses(); //this.loadMilesPercentage() this.loadSpecialService(); this.loadRAType(); this.loadAirline(); this.loadTerminal(); this.loadParentCode(); this.loadZoneCode(); this.loadAuthorizationType(); } ``` Thanks
Index was out of range. Must be non-negative and less than the size of the collection Error How to resolve?
CC BY-SA 3.0
null
2011-05-04T03:55:02.213
2011-05-04T04:03:47.037
null
null
350,648
[ "asp.net-mvc-2", "controller" ]
5,878,488
1
5,878,621
null
2
10,253
I currently have a UINavigationController in my app delegate where I push a ViewController on to login. If the login is successful I want to then create a UITabBarController with a Navigation Controller as the first Tab whose root controller is a UIViewController that I am creating. The RootViewController of my first UINavigationController is actually acting as a delegate to the logincontroller so if a user logs in correctly it calls a method in my RootViewController which is where I would then like to push a UITabBarController onto the stack. Here is my code: ``` UITabBarController *tbController = [[UITabBarController alloc] init]; FileBrowserViewController *fileController = [[FileBrowserViewController alloc] init]; fileController.pathToFileDB = pathToDBUnzipped; fileController.parentId = @"0"; UINavigationController *navController = [[UINavigationController alloc]initWithRootViewController:fileController]; NSMutableArray *aViewControllersArray = [[NSMutableArray alloc] initWithCapacity:2]; [aViewControllersArray addObject:navController]; [navController release]; [tbController setViewControllers:aViewControllersArray]; [self.navigationController pushViewController:tbController animated:YES]; [tbController release]; ``` Now, it is all working fine. Except 2 things. Here is the screen shot: ![My iPHone](https://i.stack.imgur.com/218Pc.png) 1) I can't see any uitabbar items. How do i set an image and the text for each tab? 2) I don't want that top black bar. I only want 1 bar ontop with the undo button. How do I remove the additional bar?
Adding a UITabBarController programmatically with a UINavigationBarController as the first tab TO an existing Navigation Controller
CC BY-SA 4.0
null
2011-05-04T04:19:55.040
2019-05-05T13:03:57.880
2019-05-05T13:03:57.880
1,033,581
707,193
[ "iphone", "uitabbarcontroller" ]
5,879,210
1
null
null
7
1,190
I'm using the Vim Latex Suite, and I love it. But there are some points in which it doesn't do what I want. From the `.vim/compiler/tex.vim` file: ``` " Depending on the 'ignore-level', the following kinds of messages are " ignored. An ignore level of 3 for instance means that messages 1-3 will be " ignored. By default, the ignore level is set to 4. " " 1. LaTeX Warning: Specifier 'h' changed to 't'. " This errors occurs when TeX is not able to correctly place a floating " object at a specified location, because of which it defaulted to the " top of the page. " 2. LaTeX Warning: Underfull box ... " 3. LaTeX Warning: Overfull box ... " both these warnings (very common) are due to \hbox settings not being " satisfied nicely. " 4. LaTeX Warning: You have requested ..., " This warning occurs in slitex when using the xypic package. " 5. Missing number error: " Usually, when the name of an included eps file is spelled incorrectly, " then the \bb-error message is accompanied by a bunch of "missing " number, treated as zero" error messages. This level ignores these " warnings. " NOTE: number 5 is actually a latex error, not a warning! ``` This list doesn't mention anything about missing packages. This can be noticed when compiling a Tex file that has a `\usepackage` which isn't on the system. normally one would get the error (when adding `\usepackage{notapackage}: ``` ! LaTeX Error: File `notapackage.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) ``` But in vim, since this type of error isn't supported, I get: ![enter image description here](https://i.stack.imgur.com/KMcOz.png) As you can see nothing is said about a missing package, just an cryptic `emergency stop` Another problem is that when an unknown option is passed to a package, Vim opens up that packages `.sty` file, which can be mighty irritating. How do I make vim recognize this error?
How to make the vim Latex Suite recognize an "unknown package" error?
CC BY-SA 3.0
0
2011-05-04T05:59:52.783
2011-06-05T14:24:57.043
2011-06-05T14:24:57.043
600,545
600,545
[ "latex", "compiler-errors", "vim" ]
5,879,213
1
5,879,411
null
1
587
I have a system that is tracking volunteers for a performing arts center. When they sign up to work a shift they can also sign up a buddy (or buddies). There's also a waiting list if we have too many sign-ups. The form looks like so for selecting buddies: ![enter image description here](https://i.stack.imgur.com/G6Opa.png) If the waiting list only has one position left on it I need to turn the next person's name red if they are selected (so John is selected, but when Jane is checked she turns red to serve as a warning). My problem is that the user might decide to check them both, then uncheck John instead of Jane, which should then make Jane turn black again. Is there an easy way to track clicks using something like: ``` $("input:checkbox").change(function(){ $("input:checked").each(function(i){ //object/array manipulation? }); }); ``` I had it working okay using the index of the element but realized that wouldn't work since it would keep track of the order in which the checkboxes were checked in the first place. Even a point in the right direction would be amazing. I realize I haven't given much to go on. Thanks, Jason
jQuery - Logging order of checkbox clicks
CC BY-SA 3.0
0
2011-05-04T06:00:28.900
2011-05-04T14:40:33.630
null
null
191,526
[ "jquery", "arrays", "object", "checkbox" ]
5,879,244
1
5,882,342
null
1
895
I'm a bit new to Qt4's way of laying things out and I've ran across a problem when designing the GUI for a simple image editor. I want to have the QScrollArea contain the component for image editing. However, I want the component itself to be big enough that one can scroll the entire image completely off view (but only exactly off view; no more) in any direction. Here's a (rough) diagram of what I'm thinking: ![Illustration of the said widget.](https://i.stack.imgur.com/tCOe8.png) (Apparently, you can't scroll horizontally in this diagram...) So far I haven't really figured out a way to do this. I tried messing with the widget's sizeHint and other things (like using CSS) and none of them seem to work. What should I be doing instead?
Padding in QScrollArea
CC BY-SA 3.0
null
2011-05-04T06:05:40.770
2011-05-04T10:59:55.940
null
null
610,744
[ "user-interface", "qt4" ]
5,879,294
1
6,421,504
null
5
12,655
I am trying to create a AppFuse archetype for creating a web application with Hibernate, Spring and Spring MVC using spring source. But I am getting the following error. ``` Unable to create project from archetype [org.appfuse.archetypes:appfuse-basic-spring:RELEASE] The defined artifact is not an archetype ``` Below is the screenshot. ![enter image description here](https://i.stack.imgur.com/h6v5n.jpg)
unable to create project from archetype in springsource
CC BY-SA 3.0
0
2011-05-04T06:12:55.790
2016-09-28T09:54:49.333
2016-09-28T09:54:49.333
1,438,764
644,518
[ "maven", "sts-springsourcetoolsuite", "appfuse" ]
5,879,441
1
null
null
1
3,238
hii every one how can i design the following screen, inside UIViewController class (not table view controller) programatically ![enter image description here](https://i.stack.imgur.com/F1vPy.png) thanx in advance
creating a table view in the UIView controller class
CC BY-SA 3.0
0
2011-05-04T06:31:11.743
2012-12-06T10:35:45.900
null
null
701,642
[ "iphone", "objective-c" ]
5,879,561
1
5,879,654
null
4
647
i am currently testing android inapp billing.i got code from developer site. and i followed all the instruction given in developer site. 1)uploaded apk file as draft in market 2)created product list and published 3)Registered test account and set that account as a primary account but when i testing all other reserved product id's working fine,but my product id purchase is not working .buy button is disabled. but developer site they mentioned that u can simulate the purchasing process so any body can give me the suggestion ![enter image description here](https://i.stack.imgur.com/bFP9W.png)
android inapp billing
CC BY-SA 3.0
0
2011-05-04T06:43:42.463
2012-09-28T09:28:59.400
null
null
1,131,639
[ "android", "in-app-billing" ]
5,879,567
1
5,880,194
null
2
1,142
I've created a tool which allows authors of a Typo3 site to publish wall entries on a given facebook profile or page out of the backend. This works very well, however in case of using facebook pages I encountered some trouble I could not yet solve. Using my development account I've created a page to which's wall I'd like to post. No problem so far. The issue here: Instead of the admin's account name I'd like to see the name of the page above the wall post just like when posting a message being directly on the page. The attached screenshot visualizes the problem. -- ![Current display of wall posts.](https://i.stack.imgur.com/78T15.png) -- Any idea what could be done to solve the issue? Thank you very much :) cu Roman
Posting on Facebook Wall: Author name
CC BY-SA 3.0
0
2011-05-04T06:44:25.297
2011-05-04T07:45:33.060
null
null
null
[ "facebook", "facebook-opengraph" ]