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
6,201,897
1
6,202,047
null
1
337
We linked our application with a manifest with requireAdministrator option in c++. This is because the application modifies HKLM registry entries. When we execute the application, Windows displays the following message. Is it possible to make this window do not appear for our application without changing the UAC setting of Windows? ![enter image description here](https://i.stack.imgur.com/UFWdm.jpg)
Prevent UAC Dialog
CC BY-SA 3.0
null
2011-06-01T13:26:21.280
2011-06-01T13:45:42.360
2011-06-01T13:45:42.360
32,746
382,485
[ "windows", "windows-7", "uac" ]
6,202,022
1
null
null
1
1,645
> [Why would fclose hang / deadlock? (Windows)](https://stackoverflow.com/questions/6100598/why-would-fclose-hang-deadlock-windows) when i call .close i get a crash. ![enter image description here](https://i.stack.imgur.com/CHYDC.png) What i do is save a file, close it and load it immediately. This is for debugging reasons to see if my serialization code is working (it has many checks and they all pass) I did some debugging and i cant figure out what may cause it. What i notice is - - - - - But whats bothering me is - The file seems to load properly. I put in a debug counter and it is incremented the correct amount of times. - The file handle is alive for only one function. The function loads it closes the file and returns the parsed data. Why is it affected by other files in the bat series In release mode if i run the files in the VS IDE its fine. When i press ctrl F5 to run outside it crashes. But running the single file with release outside of the IDE is fine as well. I'm very confused.
Why does my code crash on ifstream.close? (C++, VS2010)
CC BY-SA 3.0
null
2011-06-01T13:34:12.167
2011-06-01T13:46:31.870
2017-05-23T12:12:05.033
-1
null
[ "c++", "visual-studio-2010" ]
6,202,225
1
6,202,292
null
20
8,461
When I look at the javadoc for [FontMetric.getAscent()](http://download.oracle.com/javase/6/docs/api/java/awt/FontMetrics.html#getAscent%28%29) I see: > The font ascent is the distance from the font's baseline to the top of most alphanumeric characters. Some characters in the Font might extend above the font ascent line. But I wrote a quick demo program and I see this: ![enter image description here](https://i.stack.imgur.com/bC3mD.png) where the 4 horizontal lines for each row of text are: - `getDescent()`- - `getAscent()`- `getHeight()` Notice the space between the getAscent() line and the top of the characters. I've looked at most of the fonts and sizes, and there's always this gap. (Whereas the font descent looks just right.) ``` package com.example.fonts; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.GraphicsEnvironment; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Arrays; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JSpinner; import javax.swing.JTextPane; import javax.swing.SpinnerNumberModel; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; public class FontMetricsExample extends JFrame { static final int marg = 10; public FontMetricsExample() { super(FontMetricsExample.class.getSimpleName()); JPanel panel = new JPanel(new BorderLayout()); JPanel fontPanel = new JPanel(new BorderLayout()); final JTextPane textSource = new JTextPane(); textSource.setText("ABCDEFGHIJKLMNOPQRSTUVWXYZ\n" +"abcdefghijklmnopqrstuvwxyz\n" +"0123456789!@#$%^&*()[]{}"); final SpinnerNumberModel fontSizeModel = new SpinnerNumberModel(18, 4, 32, 1); final String fonts[] = GraphicsEnvironment.getLocalGraphicsEnvironment() .getAvailableFontFamilyNames(); final JComboBox fontFamilyBox = new JComboBox(fonts); fontFamilyBox.setSelectedItem("Arial"); final JPanel text = new JPanel() { @Override protected void paintComponent(Graphics g) { super.paintComponent(g); String fontFamilyName = fonts[fontFamilyBox.getSelectedIndex()]; int fontSize = fontSizeModel.getNumber().intValue(); Font f = new Font(fontFamilyName, 0, fontSize); g.setFont(f); FontMetrics fm = g.getFontMetrics(); int lineHeight = fm.getHeight(); String[] s0 = textSource.getText().split("\n"); int x0 = marg; int y0 = getHeight()-marg-(marg+lineHeight)*s0.length; for (int i = 0; i < s0.length; ++i) { y0 += marg+lineHeight; String s = s0[i]; g.drawString(s, x0, y0); int w = fm.stringWidth(s); for (int yofs : Arrays.asList( 0, // baseline -fm.getHeight(), -fm.getAscent(), fm.getDescent())) { g.drawLine(x0,y0+yofs,x0+w,y0+yofs); } } } }; final JSpinner fontSizeSpinner = new JSpinner(fontSizeModel); fontSizeSpinner.getModel().addChangeListener( new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { text.repaint(); } }); text.setMinimumSize(new Dimension(200,100)); text.setPreferredSize(new Dimension(400,150)); ActionListener repainter = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { text.repaint(); } }; textSource.getDocument().addDocumentListener(new DocumentListener() { @Override public void changedUpdate(DocumentEvent e) { text.repaint(); } @Override public void insertUpdate(DocumentEvent e) {} @Override public void removeUpdate(DocumentEvent e) {} }); fontFamilyBox.addActionListener(repainter); fontPanel.add(fontFamilyBox, BorderLayout.CENTER); fontPanel.add(fontSizeSpinner, BorderLayout.EAST); fontPanel.add(textSource, BorderLayout.SOUTH); panel.add(fontPanel, BorderLayout.NORTH); panel.add(text, BorderLayout.CENTER); setContentPane(panel); pack(); setDefaultCloseOperation(EXIT_ON_CLOSE); } public static void main(String[] args) { new FontMetricsExample().setVisible(true); } } ```
Java: FontMetrics ascent incorrect?
CC BY-SA 3.0
0
2011-06-01T13:48:12.080
2014-08-24T03:13:50.693
2011-06-01T13:54:22.377
44,330
44,330
[ "java", "fontmetrics" ]
6,202,315
1
6,202,373
null
-1
273
I would like to know how the green plus sign in the following picture is called: ![picture](https://www.abload.de/img/how-to-change-contact-skj6.png) Thanks in advance for your help!
What is this called in Android (see picture)?
CC BY-SA 3.0
null
2011-06-01T13:54:30.673
2011-06-01T13:57:59.160
2017-02-08T14:32:21.320
-1
682,998
[ "android" ]
6,202,825
1
6,202,913
null
0
588
I have a class that allows me to load all my images exactly once, it's quite nice, and while prototyping I had all of my files in one place, so I didn't have to worry about cyclical definitions. However after separating all of my classes I have a problem. ``` #ifndef IMAGEMANAGER_H #define IMAGEMANAGER_H #include "Img.h" #include <vector> #include <map> #include <string> class imgmanager{ protected: std::vector<sf::Image*> images; std::map<std::string,int> positions; public: sf::Image* addimg(std::string path); //relative to resources sf::Image* getimg(std::string path); int size(); virtual ~imgmanager(); sf::Image* operator[](int); }imagemgr; #endif ``` With the instance created after the } and before the ; my compiler complains at me: So I ask: What should I do to have a global instance of my imagemgr class? Should I just make a global header file and create an instance? (in this particular case I just make a global variable in my main.cpp, none of the headers require the instance) ![Problem Screencap](https://i.stack.imgur.com/Ln3gB.png)
Class Definition Instance Instantiation Question
CC BY-SA 3.0
null
2011-06-01T14:29:26.207
2011-06-01T14:36:41.573
2011-06-01T14:36:41.573
560,648
641,759
[ "c++" ]
6,203,013
1
6,203,993
null
8
2,814
I'm using this jQuery below call to load a .php file located on the same server. However, using Chrome's javascript console, its reporting "404 not found" on the php file I'm trying to load. Although, I can load the file directly, just by clicking on the file right there from within the console. Also, I can copy the URL of the file, right from the javascript console where it reports 404 (not found), open a new tab, paste it into the address bar, and hit the script fine, without issue. Is this something specific to the jQuery get method? What could be causing the page to 404 in the get method but execute fine when called directly? ``` $('.colorReset').click ( function() { var myImage = $('#theme :selected').text(); $.get('<?php echo get_bloginfo('template_directory') ?>/colorReset.php', {theme: myImage, spot: '1'}, function(data){doColor('#theme_header_color', data);}); } ); //script never gets to the doColor function, due to the apparent 404 on colorReset.php function doColor(el, color) { $(el).val(color).trigger('keyup'); $(el).attr('value', color); $(el).val(color); } ``` ![Here is the javascript console result](https://i.stack.imgur.com/FvWJF.jpg) ![I'm able to call the file directly using the same URL the console reports as a 404](https://i.stack.imgur.com/jGPXJ.jpg) ![Header Report](https://i.stack.imgur.com/WBMpY.jpg) Here is the source file, colorReset.php, that's called by the get... ``` <?php require_once('../../../wp-blog-header.php'); add_action( 'admin_init', 'check_user' ); function check_user() { if (!is_user_logged_in()){ die("You Must Be Logged In to Access This"); } if( ! current_user_can('edit_files')) { die("Oops sorry you are not authorized to do this"); } } $myTheme = $_REQUEST['theme']; $spot = $_REQUEST['spot']; $myThemeColor = $myTheme."_color".$spot; $file = "styles/".$myTheme."/template.ini"; if (file_exists($file) && is_readable($file)) { $ini_array = parse_ini_file($file); if($spot == 1){$myColor = $ini_array['color1'];} if($spot == 2){$myColor = $ini_array['color2'];} if($spot == 3){$myColor = $ini_array['color3'];} if($spot == 4){$myColor = $ini_array['color4'];} } else { if($spot == 1){$myColor = get_option('theme_header_color');} if($spot == 2){$myColor = get_option('theme_sidebar_color');} if($spot == 3){$myColor = get_option('theme_spot_color_alt');} if($spot == 4){$myColor = get_option('theme_spot_color_alt2');} } echo $myColor; ?> ```
When is a 404 not a 404?
CC BY-SA 3.0
null
2011-06-01T14:42:30.383
2011-06-01T20:08:12.527
2011-06-01T15:14:02.593
209,102
209,102
[ "php", "jquery", "apache", "http-status-code-404" ]
6,203,124
1
6,203,403
null
0
170
-edit2- I was going down the wrong path. I solved it by correcting one typo and adding one line to fix an oversight that allowed me to write 4 bytes to many over an array. -edit- maybe i am running through a wrong path. Maybe VS is showing me incorrect data but still runs the code properly (after all my code does show the correct name). But i have no idea where else my heap corruption could come from. I havent notice any problems or incorrect data. But i have notice random crashes and suggestions that its caused by corrupting the heap. I looked into something and this is what i notice. I have a class at address 0x00216e98. In my watch i can see the data correctly and below you can see the name ptr is 21bc00. I return the ptr as a base class (lets call it Base) which is inserted into a deque. As you can see in the deque (ls) it has one element and the first element is the correct pointer (i thought it may adjust but i guess not. But maybe it is but.....). However the members it holds is COMPLETELY INCORRECT cdcdcd00 does not look like a valid name ptr to me and does not match to the ptr below. Also when my code is ran i somehow get the correct name and such so i dont know whats going on/wrong. It could be dynamic_cast magic but anyways if i am still grabbing the correct data i dont know how i am corrupting the heap (in both gcc and msvc). I'll note i have diamond inheritance to the 'Base' class however like i said i am still pulling the correct data and i am not using virtual with base. ![enter image description here](https://i.stack.imgur.com/AXiZT.png)
(Not) Pointer Adjusting ruining my day and the heap? (C++)
CC BY-SA 3.0
null
2011-06-01T14:49:08.680
2021-11-12T20:22:42.510
2021-11-12T20:22:42.510
5,459,839
null
[ "c++", "casting", "heap-memory", "heap-corruption" ]
6,203,217
1
6,203,621
null
9
2,146
I have various hierarchical structures and would like to allow navigation around then using an editor like the Microsoft one found in the explorer address bar below. Is there such a Delphi component? (Paid for or free)? ![enter image description here](https://i.stack.imgur.com/29E8E.jpg)
Is there an edit control for Delphi that allows path editing?
CC BY-SA 3.0
0
2011-06-01T14:56:07.220
2019-05-17T06:30:30.427
null
null
47,012
[ "delphi", "path", "explorer", "edit-control" ]
6,203,262
1
6,203,372
null
0
5,251
lets say i have two points & in my 3D Space ![enter image description here](https://i.stack.imgur.com/XFYrg.png) now i want to start calculate points from to in direction of and i want to continue calculation farther from B on the same line. what i am actually working on is bullets from plane.
C# XNA - Calculating next point in a vector direction
CC BY-SA 3.0
null
2011-06-01T14:58:45.297
2012-01-07T14:40:41.597
null
null
158,455
[ "c#", "vector", "xna" ]
6,203,305
1
null
null
2
976
I develop app for iphone. One of my tasks - login on . I need sample for LoginClient Request and taking marker from it. ![enter image description here](https://i.stack.imgur.com/uHSRX.gif)
How to login in youtube with loginClient (iOS app)
CC BY-SA 3.0
0
2011-06-01T15:01:05.203
2011-10-19T14:58:04.303
null
null
587,415
[ "iphone", "ios", "authentication", "youtube", "gdata" ]
6,203,472
1
6,203,744
null
11
25,297
I want to have a simple SearchBar in ObjectiveC. Using `UISearchBar` or `UISearchBarDelegate` is confusing me. I could have used a `UITextField` but it does not have the look & feel of a search bar. As in the image attached, I want just the searchbar no `UITableView` associated with it. The image has a TableView attached but you get the point. Also after someone enters text into the searchBar & pressed "enter" how do I retrieve the text? ![enter image description here](https://i.stack.imgur.com/MuCGr.jpg) I am aware of these links which discuss the same, but they are more in light with using tables. [http://blog.webscale.co.in/?p=228](http://blog.webscale.co.in/?p=228) [http://ved-dimensions.blogspot.com/2009/02/iphone-development-adding-search-bar-in.html](http://ved-dimensions.blogspot.com/2009/02/iphone-development-adding-search-bar-in.html) [How to implement search bar in iPhone?](https://stackoverflow.com/questions/4774233/how-to-implement-search-bar-in-iphone) [UISearchBar Sample Code](https://stackoverflow.com/questions/1302962/uisearchbar-sample-code) [UISearchBar in UITableViewController?](https://stackoverflow.com/questions/4178707/uisearchbar-in-uitableviewcontroller)
Designing iOS SearchBar
CC BY-SA 3.0
0
2011-06-01T15:14:20.610
2013-01-06T03:46:39.570
2017-05-23T12:00:17.993
-1
147,019
[ "iphone", "objective-c", "ios", "uiview", "uisearchbar" ]
6,203,603
1
null
null
0
1,351
: I would like to submit comments to an article using ajax without reloading the entire page. I have a Comments controller and an Articles controller. In the Comments controller I will be using the Add function to insert comments into Db that is submitted thru the View action in the Articles. Basically, when a user visits an article and wishes to submit a comment, the following happens: 1. User inserts comments and clicks Submit in Article's view.ctp 2. The View action in the Articles controller is called 3. The action checks if Comments Data is being submitted and if it is, the Add action in the Comments controller is called to process it. 4. And then the Article's view.ctp is reloaded How do I go about adding Ajax to this process so that the only section reloaded is `<div id="article_comments"> ... </div>` in the Article's view.ctp? EDIT ====================================================== Basically, this is what I have: ![view.ctp comments section](https://i.stack.imgur.com/zfYFU.jpg) I think we the knowledge I've now acquired in both jQuery and CakePHP, I should be able to accomplish this. I will work on that, hopefully tonight. Thank you,
CAKEPHP - Submit comment and display flash message only using Ajax/Jquery
CC BY-SA 3.0
0
2011-06-01T15:21:43.697
2011-07-18T19:00:25.970
2011-07-18T19:00:25.970
597,237
597,237
[ "jquery", "ajax", "cakephp" ]
6,203,936
1
null
null
0
1,272
All, I've got a rather frustrating problem that I think is simple, but my brain is just not working. In short, the problem is: given a sprite/image/thingy, you know that someone has rotated/translated/scaled the sprite, but you don't know the order in which these happen, how can you reproduce the exact image? For illustration purposes -- Given an image like this: ![Given an image like this](https://i.stack.imgur.com/kXb4w.png) Someone has the ability to rotate/translate/scale it so that it looks like this (What it looks like after manipulation --- there's two of them in this case...) ![What it looks like after manipulation](https://i.stack.imgur.com/Orkms.png) I know that the [order of operations matter](http://msdn.microsoft.com/en-us/library/ms533864%28v=vs.85%29.aspx), that is if someone first rotates, then scales, then translates, you get a different image than if you were to do the reverse. The problem is that since I don't know the order beforehand, I am having a tough time reproducing the image. Here is what I get: ![enter image description here](https://i.stack.imgur.com/DdiqF.png) And here is what it looks like overlaid to give you an idea of how far off I am: [http://infinitetaco.com/pics/merged.png](http://infinitetaco.com/pics/merged.png) I am setting the anchorPoints of the sprites to be at the center, so that isn't the issue. I am also taking into account the width/height of the scaled change, but for some reason it's always just a bit off. It seems that the more dramatic the amount of rotation, the further off my results are. In the right image you can see the result is perfect, but the left one, since there is significant rotation, it is way off. I know this is probably an easy one, but I'd appreciate some help.
How to reproduce an object's translation,rotation,scaling? (possibly language agnostic)
CC BY-SA 3.0
null
2011-06-01T15:44:57.710
2011-06-02T18:31:03.210
null
null
750
[ "image-processing", "matrix", "cocos2d-iphone", "2d" ]
6,203,941
1
6,204,002
null
7
248
Here's a question for you RESTful nerds. Allow me to set the stage. Say I have a remote system called ChickenShack and a local system called BurgerShack, both of which are integrated such that each system maintains a "synchronized" copy of entity data. When a change occurs to entities on ChickenShack, it sends a collection of the IDs of those entities as a RESTful request to BurgerShack. BurgerShack then issues a GET request to ChickenShack, requesting all the attributes of a changed entity and updates the local copy of the entity. ![enter image description here](https://i.stack.imgur.com/ioYBd.png) All of this is asynchronous and is designed around certain constraints (so if it tastes bad to you, realize that in life sometimes we have to eat shit and smile). My question is: should the initial request issued from ChickenShack to BurgerShack be a GET or a PUT request? Since the initial request is idempotent, part of me says "GET". Yet, it does in data being changed on Burger, so another part of me says "PUT" or "POST." What do you think?
Should a RESTful HTTP request that doesn't directly result in data manipulation, but triggers manipulation, have an action of GET, PUT or POST?
CC BY-SA 3.0
0
2011-06-01T15:45:49.910
2011-06-01T15:51:28.977
null
null
129,622
[ "http", "rest" ]
6,203,964
1
6,208,095
null
0
454
``` =IF(N101<>"",ROUND(VLOOKUP($N101,$I$30:$U$39,12,FALSE)/(1-(U$96+U$98)),0),0) ``` That is the current VLOOKUP in the spreadsheet that is returning the wrong data. I didnt write it, it was on a spreadsheet before i came to the company. What I want to happen is look up the value in $N101 then i want it to find the row that is the same from i30 to i40 take whats in ((k30-j30/)/(1-(U$96+U$98)) when i say k30 i actually mean k30-k40 depending on the match. This would really help me out ![enter image description here](https://i.stack.imgur.com/XzYY6.jpg) ![enter image description here](https://i.stack.imgur.com/o10kX.jpg)
need help with excel vlookup
CC BY-SA 3.0
null
2011-06-01T15:48:05.387
2011-06-01T21:43:47.860
2011-06-01T17:42:03.740
725,431
725,431
[ "excel", "vlookup" ]
6,204,218
1
null
null
1
1,397
css works for firefox but not ie or chrome. How to fix the css so that at least IE works like firefox. ![enter image description here](https://i.stack.imgur.com/AhpBX.png) ![enter image description here](https://i.stack.imgur.com/WGcqs.png) The image is in the background as well but should be transparent. ![enter image description here](https://i.stack.imgur.com/wIqP2.png) : ``` <center><div id="slideshowContentArea" style="display:none; width:500px; height:300px"> <div class='nav'><a id='prev' href='#'>Prev</a>&nbsp&nbsp<a id='next' href='#'>Next</a></div> <div id="slideshow" class="pics" style="position: relative; overflow-x: hidden; overflow-y: hidden; height:250px; width:395px">&nbsp;</div> </div></center> $('#slideshow').cycle( { fx: 'fade', timeout: 3000, speed: 500, pager: '#slideshow', before: setBGBefore, prev:'#prev',next:'#next',after:onAfter } ); function setBGBefore() { $(this).css({ 'background-image': 'url(' + $(this).find('img').attr('src') + ')', 'background-position': 'center top', 'background-color': 'transparent' }); $(".welcomeBox div").html($(this).find('span').html()); } ```
html - css check for chrome, ie & firefox
CC BY-SA 3.0
null
2011-06-01T16:05:00.213
2011-06-01T16:18:24.027
2011-06-01T16:08:58.523
464,744
779,575
[ "jquery", "html", "css" ]
6,204,268
1
6,204,345
null
4
4,339
I'm running throuth Microsoft's [101 LINQ Samples](http://msdn.microsoft.com/en-us/vcsharp/aa336758#SelectSimple1), and I'm stumped on how this query knows how to assign the correct `int` value to the correct `int` field: ``` public void Linq12() { int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var numsInPlace = numbers.Select((num, index) => new { Num = num, InPlace = (num == index) }); Console.WriteLine("Number: In-place?"); foreach (var n in numsInPlace) { Console.WriteLine("{0}: {1}", n.Num, n.InPlace); } } ``` I saw in [SO #336758](https://stackoverflow.com/questions/2082701) that there have been errors in the examples before, but it is much more likely that I am just missing something. Could someone explain this and how the compiler knows how to interpret this data correctly? OK, I think my confusion comes from the LINQ extension that enables the feature to work. The and two parameters `IEnumerable<TResult> IEnumerable<int>.Select(Func<int,int,TResult> selector)` are most likely the key to my lack of understanding. ![enter image description here](https://i.stack.imgur.com/AoIE5.png)
Explain Linq Microsoft Select - Indexed [Example]
CC BY-SA 3.0
null
2011-06-01T16:08:42.470
2011-06-01T19:55:29.630
2017-05-23T12:26:58.703
-1
153,923
[ "c#", "linq" ]
6,204,433
1
null
null
3
546
We have SWT apps which use the setForeground method on windows XP, and they work fine. However, running the most recent stable SWT jars and dlls on Win7 seems to show the setForeground method being ignored. I know that the javadoc says it's a hint, but I wanted to know if this is because something changed between XP and 7, or if it's possible it's a system setting on my new Win7 install. I had found this post: [How to set SWT button foreground color?](https://stackoverflow.com/questions/4747562/how-to-set-swt-button-foreground-color), but the main answer definitively says that setForeground is ignored on Windows, which isn't true in XP. Also, our problem doesn't seem to be limited to Buttons. Same issues happen with Groups as well. ![Screenshot Comparison](https://i.stack.imgur.com/OsPQu.png) Apparently, a hacky work-around exists by adding a paint listener that manipulates the GC directly to redraw the text with the appropriate color, besides being hacky, this is not practical, because it would mean we had to add this listener to the thousands places where we use Buttons. Thanks for any help.
SWT setForeground in Windows 7 vs. Windows XP
CC BY-SA 3.0
0
2011-06-01T16:19:18.033
2011-07-15T07:51:39.810
2017-05-23T12:12:05.033
-1
779,777
[ "windows-7", "swt" ]
6,204,441
1
6,204,589
null
15
2,204
Currently, we have many web applications (external & internal) developed using Classic ASP through .NET 2.0 technologies. Each of those web applications have their own login screen authenticating against their own custom database or using Windows authentication. Users have access to one or more of these applications, meaning they have to log out and log back into applications that they would like to access. All applications share some part of the back-end data sources. Also, the business logic is embedded in the UI in addition to being duplicated across applications because there is no code/business logic sharing. Screenshot # gives a brief idea of the existing architecture. ![Existing](https://i.stack.imgur.com/q8xZP.gif) Screenshot # shows the suggested architecture, which I hope will help in faster development, code/business re-usability and may be simpler maintenance. Users will access either external or internal url. In external, users will provide credentials and will be authenticated against custom database. In internal site, users will be automatically logged in using Windows authentication. After creating some samples, I have begun to like ASP.NET MVC 3. It keeps business logic separate from UI and I also like the unit testing capabilities. Here are my questions: 1. Based on what I have found on the web so far, multiple authentications are not feasible within a single website. My understanding is that I have to host one website for each type of authentication (Forms and Windows). How do I redirect users to common landing page after they are authenticated so they can see the modules (links/menus) that they are authorized to access? Should I have to publish the same code set (dlls and content) to both the websites? 2. Has anyone faced a similar architecture problem? If yes, could you please share the challenges that you faced and how you tackled them? What are the industry standards in designing applications of this sort? 3. Does the suggested architecture make any sense or is it a really bad design? Are there any drawbacks in doing this in ASP.NET MVC 3? I would really appreciate your inputs. Thanks in advance. ![Suggested](https://i.stack.imgur.com/hKa0e.gif)
How to migrate applications from Classic ASP to ASP.NET MVC?
CC BY-SA 3.0
0
2011-06-01T16:20:20.330
2011-11-20T01:32:46.763
2011-11-20T01:32:46.763
3,043
null
[ "asp.net", "asp.net-mvc-3", "web-applications", "asp-classic" ]
6,204,485
1
6,205,517
null
0
377
I want to create a core data model to store user input questions and then entries for those questions. The questions will be 1 of 3 types. (1-10, Yes No or a number of specific units). So users will go into the app, click "add question" and will be shown a form where they will input the choose the (Yes/No, Scale 1-10 or Specific Units) - and if they choose specific units they have to put in those units eg: centimetres, millimetres, litres etc... There will be multiple entries to these questions mapped over a period of time. IE: Users may put in the questions "How tall is your tomato plant? - specific units - CMs" and "How red are your tomatos? - scale 1-10" and will go back into the app time and again to map out the progress over time. My question is about database design for this. How would I set this up in my core data? At the moment I have this: ![enter image description here](https://i.stack.imgur.com/yoBX7.png) Now, I'm stuck! I don't quite know how to account for the fact that questions have different types, and therefore the entries will be different. Plus I need to account for questions where units may be required. These are the questions that will just be a number. So I'm thinking I probably need different question entites. Something like having a Questions entity and the specific questions as sub-entites - but I'm not sure how to do this, and not sure how to then record the entries made to those questions! Thank you for looking, and for helping if you can. :)
Core data database design issues
CC BY-SA 3.0
null
2011-06-01T16:23:26.667
2011-06-01T17:50:16.427
2011-06-01T16:44:14.807
414,972
414,972
[ "ios", "database-design", "core-data" ]
6,204,456
1
null
null
1
3,253
I'm using the following code to try to stop a service. I can display the service state using so I know I have the right service name and that it can find it and determine its state as or but when I run this script I get an Error on Line 51: Error Not Found Code 80041002 (see screenshot) The line of code at 51 is: ``` objService.StopService() ``` Where am I going wrong? I can stop and start this via the command line using sc.exe and am able to control other services ie Alerter but as soon as I try to control this particular service it fails. Thanks > The full code from the script (Thanks Brandon Moretz who pointed out that I hadn't posted the full code so the Line number didn't mean anything & I have changed the StartService() back to Stop as it originally was so now you have more to go on. Sorry!) ``` ' 1. Check that the latest backup zip exists and store its name in LBZ (LatestBackupZip) ' 2. Stop the Livecontent Service ' 3. Remove .dbx, .lck and .log files from DataFolder ' 4. restart the service ' 5. Restore the database Dim fileNewest Dim fso Set fso = WScript.CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") 'Set ImportFldr = fso.GetFolder("C:\Program Files (x86)\XyEnterprise\SDL LiveContent\data\Import") Set ImportFldr = fso.GetFolder("C:\Program Files\XyEnterprise\SDL LiveContent\data\export") 'Set DataFldr = fso.GetFolder("C:\Program Files (x86)\XyEnterprise\SDL LiveContent\data") Set DataFldr = fso.GetFolder("C:\Program Files\XyEnterprise\SDL LiveContent\data") For Each aFile In ImportFldr.Files sExtension = fso.GetExtensionName(aFile.Name) If sExtension = "log" Then 'Msgbox "The file extension is a " & sExtension Else 'Msgbox "The file extension is a " & sExtension If fileNewest = "" Then Set fileNewest = aFile Else 'If fileNewest.DateCreated < aFile.DateCreated Then If CDate(fileNewest.DateCreated) < CDate(aFile.DateCreated) Then Set fileNewest = aFile End If End If End If Next Msgbox "The Newest File in the folder is " & fileNewest.Name & chr(13) & "Size: " & fileNewest.Size & " bytes" & chr(13) & "Was last modified on " & FileNewest.DateLastModified ' Change to /Data 'WScript.Echo WshShell.CurrentDirectory WshShell.CurrentDirectory = DataFldr 'WScript.Echo WshShell.CurrentDirectory ' Stop the Livecontent service strComputer = "." Dim objService Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colServiceList = objWMIService.ExecQuery _ ("Select * from Win32_Service where Name = 'LiveContent'") For Each objService in colServiceList WScript.Echo objService.State If objService.State = "Running" Then objService.StopService() 'Wscript.Sleep 5000 End If Next 'Dim objShell 'Set objShell = CreateObject("WScript.Shell") 'objShell.Run "%comspec% /k c: & cd ""C:\Program Files (x86)\XyEnterprise\SDL LiveContent\"" & """"loaddb RESTORE -'Dlc.file=C:\PROGRA~2\XYENTE~1\SDLLIV~1\data\Import\" & fileNewest.Name & " -Dlc.pswd=N2kAs72z""""" ``` ![script error when trying to stop service](https://i.stack.imgur.com/KL2e2.png) I have taken your code and still can't get it to work. I noticed that the line: Set objWMIService = GetObject("winmgmts:\" & strComputer & "\root\cimv2") was missing a \ at "winmgmts:\" which I have added and I like your check to see if there is an (x86) directory as I am testing this on a 32bit server but will move it over to a 64 when it is ready so that will work nicely. Also this section didn't work: ``` If fso.FolderExists( "C:\Program Files (x86)\XyEnterprise\SDL LiveContent\data" ) Then Set DataFldr= fso.GetFolder("C:\Program Files (x86)\XyEnterprise\SDL LiveContent\data") Else If fso.GetFolder("C:\Program diles\XyEnterprise\SDL LiveContent\data") Then Set DataFldr= fso.GetFolder("C:\Program diles\XyEnterprise\SDL LiveContent\data") End If ``` But did if I changed the ElseIf to The script runs fine if I comment out Line 78 objService.StopService() But as soon as I uncomment it I get an error: Line: 78 Char: 9 Error: Not found Code: 80041002 Source: SWbemObjectEx But the Service can be found as the line: WScript.Echo objService.State Echos its state to the screen. Really confuzzled now. ``` ' 1. Check that the latest backup zip exists and store its name in LBZ (LatestBackupZip) ' 2. Stop the Livecontent Service ' 3. Remove .dbx, .lck and .log files from DataFolder ' 4. restart the service ' 5. Restore the database Dim fileNewest Dim ImportFldr Dim DataFldr Dim fso Set fso = WScript.CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") If fso.FolderExists( "C:\Program Files\XyEnterprise\SDL LiveContent\data\Import" ) Then Set ImportFldr = fso.GetFolder("C:\Program Files\XyEnterprise\SDL LiveContent\data\Import") Else WScript.Echo "Warning: Import Directory can not be found" End If If fso.FolderExists( "C:\Program Files\XyEnterprise\SDL LiveContent\data\export" ) Then Set ImportFldr = fso.GetFolder("C:\Program Files\XyEnterprise\SDL LiveContent\data\export") Else WScript.Echo "Warning: Export Directory can not be found" End If If fso.FolderExists( "C:\Program Files\XyEnterprise\SDL LiveContent\data" ) Then Set DataFldr= fso.GetFolder("C:\Program Files\XyEnterprise\SDL LiveContent\data") Else WScript.Echo "Warning: Data Directory can not be found" End If For Each aFile In ImportFldr.Files sExtension = fso.GetExtensionName(aFile.Name) If sExtension = "log" Then 'Msgbox "The file extension is a " & sExtension Else 'Msgbox "The file extension is a " & sExtension If fileNewest = "" Then Set fileNewest = aFile Else If fileNewest.DateCreated < aFile.DateCreated Then If CDate(fileNewest.DateCreated) < CDate(aFile.DateCreated) Then Set fileNewest = aFile End If End If End If End If Next 'Msgbox "The Newest File in the folder is " & fileNewest.Name & chr(13) & "Size: " & fileNewest.Size & " bytes" & chr(13) & "Was last modified on " & FileNewest.DateLastModified ' Change to /Data WScript.Echo WshShell.CurrentDirectory WshShell.CurrentDirectory = DataFldr WScript.Echo WshShell.CurrentDirectory ' Stop the Livecontent service strComputer = "." Dim objService Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colServiceList = objWMIService.ExecQuery _ ("Select * from Win32_Service where Name = 'LiveContent'") For Each objService in colServiceList WScript.Echo objService.State If objService.State = "Running" Then objService.StopService() WScript.Echo objService.State Wscript.Sleep 5000 End If Next ``` After very extensive testing we have come to the conclusion that there is nothing wrong with the script, it is just that this particular service will not stop with this method. To this end we have moved on and are now using ``` objShell.Run "sc start LiveContent" ``` And this works a treat. Thanks to Brandon for your help.
Can't stop a service using vbscript
CC BY-SA 3.0
null
2011-06-01T16:21:31.110
2011-09-27T15:11:14.680
2011-06-08T11:23:21.313
523,938
523,938
[ "vbscript" ]
6,204,634
1
6,205,035
null
6
21,295
I have a Windows Service that is always running when the user starts their workstation. This Windows Service is critical and I would like to show a Balloon Notification in the Notification Area when certain things happen such as the Service Stops, Starts, Restarts etc. For example: ![enter image description here](https://i.stack.imgur.com/ryZHG.png) Also, is there a way to show a Notification Area Icon for my Windows Service?
How can I show a Notification Area Balloon and Icon from a Windows Service?
CC BY-SA 3.0
0
2011-06-01T16:35:46.017
2013-03-29T15:43:19.800
2011-06-01T16:43:20.107
723,980
723,980
[ "c#", "windows-services", "notifications", "notification-area" ]
6,204,898
1
6,205,325
null
9
12,675
I have another question about Wolfram Mathematica. Is there someone that knows how I can plot a graphic on the y axis? I hope that the figure helps. ![enter image description here](https://i.stack.imgur.com/k36kb.png)
plotting on the y-axis in Mathematica
CC BY-SA 3.0
0
2011-06-01T16:58:06.910
2011-06-04T15:59:18.043
2011-06-01T19:46:11.560
618,728
377,356
[ "function", "wolfram-mathematica", "plot" ]
6,205,320
1
8,724,316
null
0
658
I'm a beginner and I trying continue to familiarize myself with `CALayer` ... Thanks again @Alexsander Akers, @DHamrick and @Tommy because now I can skew my `CALayer` ! It look like : ![capt 1](https://i.stack.imgur.com/oy6td.png) I would like to move my finger on the Gray `UIView` (with `touchesBegan`/`touchesMoved`/`touchesEnded`) and my "cards" move like this : (For exemple if I move my finger left) - - - - - Maybe I'm dreaming and it's to hard for me, but if if you can give me advice I'll take it !! thank you !
CALayer Animation
CC BY-SA 3.0
null
2011-06-01T17:32:05.530
2017-08-30T06:17:21.473
2017-08-30T06:17:21.473
1,778,674
487,971
[ "objective-c", "core-animation", "calayer" ]
6,205,441
1
6,216,128
null
2
5,523
I need to create the following table in LaTeX and I just cannot seem to get it right. ![Image](https://i.stack.imgur.com/KU1cz.jpg) The text inside the cells is not centered correctly and the same goes for the "Eye movements" cell. Could any of you see what I doing wrong? ``` \begin{tabular}{ccc|c} & & \multicolumn{2}{c}{\textbf{Response}} \\ & & unnatural & natural \\ \cline{3-4} \multicolumn{1}{c}{\multirow{2}{*}{\begin{sideways}\textbf{Eye movement}\end{sideways}}} & \multicolumn{1}{c|}{\begin{sideways}unnatural\end{sideways}} & 1 & \multicolumn{1}{c|}{2} \\ \cline{2-4} \multicolumn{1}{c}{} & \multicolumn{1}{c|}{\begin{sideways}natural\end{sideways}} & 3 & \multicolumn{1}{c|}{4} \\ \cline{3-4} \end{tabular} ```
Multirow multicolumn table
CC BY-SA 3.0
null
2011-06-01T17:43:32.747
2017-01-14T22:58:56.423
2017-01-14T22:58:56.423
4,370,109
779,895
[ "latex" ]
6,205,581
1
6,205,622
null
3
13,388
I have recently heard of and ran across QR codes being scanned for app downloads. I would like to know how this works? Can someone explain to me what program they use to "scan" and what happens after that? I would love to implement this into my apps. ![Example picture of an website with QR code](https://i.stack.imgur.com/6BiAF.jpg)
"Scan now to download" QR code for iPhone App Download
CC BY-SA 3.0
0
2011-06-01T17:55:45.237
2019-05-02T08:42:31.227
2011-06-01T18:04:42.010
350,272
270,760
[ "ios", "app-store", "qr-code" ]
6,205,621
1
6,285,008
null
16
33,934
Can I add links in google chart api? For example, ![enter image description here](https://i.stack.imgur.com/Eb2Ls.png) How could I add link to "Work" or "Eat" ? Thanks!
How to add links in google chart api
CC BY-SA 3.0
0
2011-06-01T17:59:23.397
2022-05-17T14:29:58.590
null
null
null
[ "api", "charts" ]
6,205,708
1
6,206,428
null
1
776
I'm using Matlab to find effective ways of deconvolving the output of a spectrometer to get the original input. The function deconvwnr() works well, except it introduces a lot of sinusoidal-esque noise which I have been getting rid of with matlab's built-in band-stop butterworth filtering: ``` [b,a] = butter(3,[iters-freq,iters+freq],'stop'); recovered = filter(b,a,toBS); ``` The problem is that this filter is one-sided, defined as If x[n] is the array and y[n] is the filtered array, f:x->y is one-sided iff y[n] = f( x[n], x[n-1], x[n-2]...) and introduces a shift in the spectrometer peaks: ![shift](https://i.stack.imgur.com/8mHsU.png) Thus, I need to use a two-sided, symmetric filter. Is there an easy, built-in way to do this in Matlab? ---Alternatively---are there any really good, "it just works", noise-tolerant deconvo algorithms out there?
Symmetric Bandstop Filter in Matlab?
CC BY-SA 3.0
null
2011-06-01T18:06:02.040
2011-06-01T19:12:05.477
2011-06-01T19:09:18.867
644,220
644,220
[ "matlab", "filter" ]
6,205,697
1
6,205,891
null
2
7,792
I am using Eclipse ADT to develop an Android application. When focus comes over one of the EditText(at lower end of page) the keypad covers the EditText so when I am keying text, I can't see what's being keyed in. What are my options ? ``` <?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:background="#a8e8f0" android:orientation="vertical" android:id="@+id/layout"> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:background="@drawable/welcome_background"> <include layout="@layout/top"></include> <RelativeLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center"> <LinearLayout android:layout_width="270dp" android:orientation="vertical" android:layout_height="wrap_content" android:id="@+id/body"> <ImageView android:layout_width="wrap_content" android:src="@drawable/welcome_title" android:layout_height="wrap_content" android:id="@+id/title" style="@style/Theme.Connector.ImageElement"></ImageView> <TextView android:text="@string/welcome_text" android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txt_welcome" style="@style/Theme.Connector.FormText"></TextView> <Spinner android:layout_width="fill_parent" android:layout_height="wrap_content" style="@style/Theme.Connector.WelcomeSpinner" android:layout_weight="1" android:id="@+id/spinner_isp" /> <EditText android:layout_height="wrap_content" android:singleLine="true" style="@style/Theme.Connector.WelcomeInput" android:hint="@string/txt_user" android:layout_width="fill_parent" android:id="@+id/edit_user"></EditText> <EditText android:layout_alignParentLeft="true" android:singleLine="true" android:layout_height="wrap_content" style="@style/Theme.Connector.WelcomeInput" android:hint="@string/txt_password" android:layout_width="fill_parent" android:password="true" android:id="@+id/edit_password"/> <LinearLayout android:layout_width="fill_parent" android:orientation="horizontal" android:layout_height="fill_parent" android:id="@+id/frm_action"> <Button style="@style/Theme.Connector.Button" android:layout_height="wrap_content" android:layout_width="100dp" android:text="@string/btn_cancel" android:layout_weight="1" android:id="@+id/btn_cancel" /> <Button android:text="@string/btn_continue" android:layout_height="wrap_content" android:layout_width="100dp" style="@style/Theme.Connector.ButtonContinue" android:layout_weight="1" android:id="@+id/btn_continue"></Button> </LinearLayout> </LinearLayout> </RelativeLayout> </LinearLayout> </LinearLayout> ``` ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="vex.connector" android:versionCode="1" android:versionName="1.0"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Theme.Connector"> <activity android:name=".IndexActivity" android:label="@string/app_name" android:screenOrientation="portrait" android:windowSoftInputMode="stateVisible|adjustPan"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <receiver android:name=".WiFiBroadcastReceiver"> <intent-filter> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> </intent-filter> </receiver> </application> </manifest> ``` ![keyboard](https://i.stack.imgur.com/EWtMl.png)
Soft Keyboard comes over the EditText
CC BY-SA 3.0
0
2011-06-01T18:05:14.010
2017-04-22T20:49:04.460
null
null
564,416
[ "android", "user-interface" ]
6,205,803
1
6,207,352
null
4
15,203
I'm learning to use Springsource Tool Suite (STS) and the Spring framework for development. I am trying out the Amazon AWS SDK for eclipse and decided to install it into STS. When I follow create a new AWS project, it puts the .java file under src instead of src/main/java and when I try to build that, it says "There is no main" or something like that. But, when I move the AwsConsoleApp.java and the AwsCredentials.properties to src/main/java then (default package), I can run the file as a Java application. My question is, what is the difference between `src/main/java` -> default package and src -> main. I've attached an image to clarify things: ![Project_Explorer_View](https://i.stack.imgur.com/dSl0x.jpg)
What is the difference between src/main/java and src in Springsource Tool
CC BY-SA 3.0
null
2011-06-01T18:14:50.107
2015-09-02T10:56:06.540
2015-09-02T10:56:06.540
1,793,718
384,964
[ "eclipse", "sts-springsourcetoolsuite" ]
6,206,239
1
6,206,308
null
1
52
I have the following image in my app: It's a 59x60 PNG. ![enter image description here](https://i.stack.imgur.com/SOEo4.png) I use it in the following layout: ``` <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/headerContainer" xmlns:android="http://schemas.android.com/apk/res/android"> <ImageView android:id="@+id/menu_refresh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/menu_bt_refresh" android:layout_alignParentRight="true" /> </RelativeLayout> ``` When I run it in my Nexus One, the width of the ImageView is 89 pixels. Why?
ImageView is being re-sized - why?
CC BY-SA 3.0
null
2011-06-01T18:54:49.930
2011-06-01T19:02:03.070
null
null
1,406
[ "android" ]
6,206,262
1
6,206,289
null
1
1,966
I'm trying to design a button for an android application like this: ![enter image description here](https://i.stack.imgur.com/nD6Bh.jpg) The length of the button will be determined based on the size of the text. The text will change during runtime depending on the page the button is displayed on. Does anyone have an idea on how I can achieve this?
Android Change Shape of Button
CC BY-SA 3.0
null
2011-06-01T18:56:53.300
2011-06-01T18:59:59.100
2011-06-01T18:59:32.873
69,802
770,061
[ "android", "button", "imagebutton", "shapes" ]
6,206,459
1
6,527,922
null
3
2,909
![enter image description here](https://i.stack.imgur.com/q35FR.png) Hi I want to make the map view to look like that. I want to make the bottom right like that and when I click on it, it launches a modal view controller. How to do this?
ios page curl to show view controller
CC BY-SA 3.0
0
2011-06-01T19:14:52.983
2011-06-29T22:17:09.890
null
null
236,924
[ "ios" ]
6,206,983
1
6,207,016
null
2
344
Ok, I have a problem with the documentation for the namespace . It states in the documentation in that the code in this namespace is not intended to be used by ones application directly but it's code for supporting features in the . Nowhere says what functionality this supports and what should we use to interact with documents if not this. If you know what part of the they are implicitly talking about here, please, let me know. I've been searching for this for almost 4 months now. Thanks in advance. ![enter image description here](https://i.stack.imgur.com/kcnhq.png)
If not Microsoft.Office.Interop.Excel then what?
CC BY-SA 3.0
null
2011-06-01T20:04:40.123
2011-06-01T20:06:52.827
null
null
244,054
[ ".net", "excel", "ms-office" ]
6,207,012
1
6,304,160
null
3
898
I have a project under source control and anytime I try to check in one of the solutions I get this error message ![enter image description here](https://i.stack.imgur.com/92Ka6.png) I've not got a project GlassButtons so I have no idea what SVN is looking for.
SVN error when trying a commit
CC BY-SA 3.0
null
2011-06-01T20:06:44.443
2011-06-10T20:51:12.170
null
null
88,230
[ "ankhsvn" ]
6,207,306
1
6,209,150
null
0
254
![enter image description here](https://i.stack.imgur.com/4KEjl.png) Hi I want to load a square image (the page curl) as seen in the lower right corner programmatically when the view controller loads. How to do this?
programmatically load image at coordinate
CC BY-SA 4.0
null
2011-06-01T20:34:40.777
2018-05-17T10:01:57.880
2018-05-17T10:01:57.880
1,033,581
236,924
[ "ios" ]
6,207,496
1
6,400,129
null
4
870
I am working on a new app. I render different documents from an NSAttributedString using Core Text. I am having trouble with strange glitches in the rendering of the text. It doesn't happen with every document. There doesn't seem to be a rhyme or reason to when it appears or not. Here is a cropped screen shot here to demonstrate the problem. ![Glitch in rendering](https://i.stack.imgur.com/ZqraO.png) Here is a line from the same screenshot that is rendered correctly. ![Correct rendering](https://i.stack.imgur.com/nMDEs.png) When the problem occurs, there are usually only 2-3 consecutive lines of text that are rendered incorrectly. The rest of the document is fine. Here is the code that I use to render the text in drawRect: ``` CGContextRef context = UIGraphicsGetCurrentContext(); float viewHeight = self.bounds.size.height; CGContextTranslateCTM(context, 0, viewHeight); CGContextScaleCTM(context, 1.0, -1.0); CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1.0, 1.0)); CGMutablePathRef path = CGPathCreateMutable(); CGRect bounds = CGRectMake(PADDING_LEFT, -PADDING_TOP, self.bounds.size.width-20.0, self.bounds.size.height); CGPathAddRect(path, NULL, bounds); CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString((CFMutableAttributedStringRef)attrString); CTFrameRef frame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, 0), path, NULL); CFRelease(framesetter); CFRelease(path); CTFrameDraw(frame, context); ``` Any assistance is appreciated! This problem does not appear to exist on the iPhone 4, only on the 3GS that I have for testing. The glitch is always in the middle of a document.
CoreText rendering text glitch
CC BY-SA 3.0
null
2011-06-01T20:50:45.000
2011-06-20T19:49:45.737
2011-06-20T19:49:45.737
399,076
399,076
[ "iphone", "ios", "core-text" ]
6,207,566
1
6,458,031
null
1
5,470
I'm having a problem with layer-list on Android. I want to do a simple pile of images. I can achieve that with the following code: ``` <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <rotate android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0" android:toDegrees="0"> <bitmap android:src="@drawable/teste1" android:gravity="center" /> </rotate> </item> <item> <rotate android:pivotX="50%" android:pivotY="50%" android:fromDegrees="-9" android:toDegrees="-9"> <bitmap android:src="@drawable/teste3" android:gravity="center" /> </rotate> </item> <item> <rotate android:pivotX="50%" android:pivotY="50%" android:fromDegrees="9" android:toDegrees="9"> <bitmap android:src="@drawable/teste2" android:gravity="center" /> </rotate> </item> </layer-list> ``` But when I run it, the result is cropped on the top and on the bottom, as seen on the following image: ![cropped_image](https://i.stack.imgur.com/s9IXc.png) I have another doubt: if I put an ID on the `<item>` how do I retrieve it on my View so I can change the bitmap in code? The [documentation](http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList)* says I have to use an View.findViewByID, but I want to get the BitmapDrawable, and I can't cast a View to a Drawable! I also tried coding the same thing on a CustomView, with Canvas.drawBitmap, but it's looking very ugly, if someone can point out a good solution using that I would appreciate too. Thanks in advance
Rotate inside layer-list item is being cropped
CC BY-SA 3.0
0
2011-06-01T20:55:10.347
2011-06-23T17:17:53.770
null
null
691,169
[ "android" ]
6,207,774
1
7,564,153
null
5
1,730
Now that Google has officially released their [+1 button for websites](http://googleblog.blogspot.com/2011/06/1-button-for-websites-recommend-content.html), I'd like to find a way to retrieve the total number of +1's for a specific URL programmatically. For example, I'd like to access this value independently of the +1 button for use in tooltips, as shown for RSS subscribers below. ![Social Widget](https://i.stack.imgur.com/is8UK.png) More information on the +1 button: [https://code.google.com/apis/+1button/](https://code.google.com/apis/+1button/)
How to programmatically retrieve the total number of Google +1's for a URL
CC BY-SA 3.0
0
2011-06-01T21:12:46.517
2016-12-26T15:47:18.713
2016-12-26T15:47:18.713
1,033,581
606,910
[ "api", "google-plus-one" ]
6,207,771
1
6,216,112
null
5
193
Our current svn structure looks like this: ``` trunk -- project -- projectDao -- projectResources branches -- project-1.0 -- projectDao-1.0 -- projectResources-1.0 -- project-2.0 -- projectDao-2.0 -- projectResources-2.0 tags -- project-1.0.0 -- ... ``` To make things worse project-1.0 was branched from project projectDao-1.0 from projectDao (each in seperate move commits). Idealy it would have been like this. This is the commit log: ``` trunk -- project -- projectDao -- projectResources branches -- 1.0 ---- project ---- projectDao ---- projectResources -- 2.0 ---- project ---- projectDao ---- projectResources tags --1.0.0 ----project ---- ... ``` And this is the way it makes sense. And we should then have branched from trunk to 1.0 instead of 2 different commits. We however want to switch to git now (permanently) and I am at a loss how i should start with this. I don't really get how i should do this. When i just git clone my repository with standard layout I get something this. ``` * master remotes/project-1.0 remotes/project-1.0@3 remotes/project-2.0 remotes/project-2.0@10 remotes/projectDao-1.0 remotes/projectDao-1.0@4 remotes/projectDao-2.0 remotes/projectDao-2.0@11 remotes/projectResources-1.0 remotes/projectResources-1.0@5 remotes/projectResources-2.0 remotes/projectResources-2.0@12 remotes/tags/project-1.0.0 remotes/tags/projectDao-1.0.0 remotes/tags/projectResources-1.0.0 remotes/trunk ``` This is what gitg generates ![This is what gitg generates](https://i.stack.imgur.com/rkBEL.png) I don't know how I can use rebase to get this right like: ``` * master remotes/1.0 remotes/2.0 remotes/tags/1.0.0 remotes/trunk ```
Svn to git: How to deal with our not-standard, probably wrongly branched svn
CC BY-SA 3.0
0
2011-06-01T21:12:28.320
2011-06-02T15:03:19.300
2011-06-02T14:58:28.133
780,144
780,144
[ "svn", "git", "branch" ]
6,207,816
1
6,372,452
null
0
50
I´m working with MVC3 in ASP .NET and stuck a little at the databasemodel. I use the EntityFramework to create tables from my models. Now I want to define a PrimaryKey that depends from the MaterialID and the ListID. But how can I define it in C#? Is there a Tag like [Key] to define that the PrimaryKey depends on more than one value? ![database diagram](https://i.stack.imgur.com/qUW41.png)
How to define a PrimaryKeyPair for the database in C# (MVC)
CC BY-SA 3.0
null
2011-06-01T21:16:45.047
2011-06-16T13:12:11.457
null
null
639,367
[ "c#", "database-design", "asp.net-mvc-3" ]
6,207,961
1
6,208,133
null
0
226
I have a property in my model very simple one: ![enter image description here](https://i.stack.imgur.com/1Q7tl.png) Now this dropDown doesn't work right ``` @Html.DropDownListFor(m => m.Camp, new SelectList(ViewBag.Camps, "Id", "Name")) ``` it returns `null` instead of a chosen Camp, but if I change that into: ``` @Html.DropDownListFor(m => m.Camp.Id, new SelectList(ViewBag.Camps, "Id", "Name")) ``` It would return me a `Camp` object with correct `Id`, but the `Name` would be still `null`. Why? And now another problem is if I choose the second approach it would screw up with unobtrusive validation. Although I'll be able to get the right camp based on the chosen id.
DropDownListFor why it gets the Key and Nothing else
CC BY-SA 3.0
null
2011-06-01T21:31:17.850
2011-06-02T16:38:28.303
2011-06-02T16:38:28.303
116,395
116,395
[ "asp.net-mvc-3", "drop-down-menu" ]
6,208,008
1
6,208,321
null
0
234
I'd like to develop an app to visualize galleries and I really like the Flickr official app or Instabam app style. Basically, something like this (instabam app) ![enter image description here](https://i.stack.imgur.com/9j4IT.jpg) my idea was to use a scrollview with buttons to easily handle touch event. Is this a good approach? Are there better approaches?
iOS images galleriers
CC BY-SA 3.0
null
2011-06-01T21:35:16.683
2013-01-05T12:05:05.373
null
null
564,786
[ "ios", "image", "uiscrollview", "uiimage", "gallery" ]
6,208,187
1
6,220,257
null
0
1,289
I have the following very simple Ext JS 4 script which is supposed to fetch two rows from an URL and display it in a Ext JS grid panel. ``` Ext.define('Entry', { extend: 'Ext.data.Model', fields: [ {name: 'id', type: 'int'}, {name: 'val' } ] }); var store = Ext.create('Ext.data.Store', { model: 'Entry', proxy: { type: 'ajax', //url: '/admin/ext-list-searches', // does not work url: '/server.php', // works reader: { type: 'json', root: 'entries' } }, autoLoad: true }); var grid = Ext.create('Ext.grid.Panel', { store: store, columns: [ { text : 'id', dataIndex: 'id' }, { text : 'val', dataIndex: 'val' } ], title: 'Test', renderTo: 'ext-content' }); ``` I tested it with two URLs: 1. /server.php <- works 2. /admin/ext-list-searches <-fails Both URL return the identical content (along with an HTTP response header): ``` {"entries":[{"id":1,"user":"Chris"},{"id":2,"user":"Paul"}]} ``` Case 1 works fine: ![screenshot_success](https://i.stack.imgur.com/I37SV.png) However, case 2 does not display anything: ![enter image description here](https://i.stack.imgur.com/Aa76s.png) The data is being properly loaded according to Firebug in both cases. This does not make any sense to me. Are there any path-limitations I don't know of? I've seen that behavior in Chrome and Firefox 4. I am using Ext JS 4.0.1
Loading remote data into a ExtJS-Grid-Panel fails depending on the URL used
CC BY-SA 3.0
null
2011-06-01T21:54:14.170
2011-06-02T20:52:25.217
null
null
2,454,815
[ "javascript", "extjs" ]
6,208,308
1
6,208,441
null
2
1,177
I have a problem understanding an UML below: ![UML Image](https://i.stack.imgur.com/wfOr3.png) Specifically, what is the relationship between `PersistentSet` and `ThirdPartyPersistentSet`? What is the relationship between `PersistentObject` and `ThirdPartyPersistentSet`? Please note that the UML is from Agile Principles, Patterns, and Practices in C# By Martin C. Robert, Martin Micah 2006. Chapter 10 Thanks in advance!
UML help C# Design Principles
CC BY-SA 3.0
0
2011-06-01T22:06:46.743
2019-08-11T01:12:27.223
2011-06-03T05:29:48.260
427,648
665,335
[ "c#", "oop", "uml", "design-principles" ]
6,208,317
1
6,209,271
null
1
3,238
Rebuilding original signal from frequencies, amplitude, and phase obtained after doing an fft. Greetings I'm trying to rebuild a signal from the frequency, amplitude, and phase obtained after I do an fft of a signal, but when I try and combine the fft data (frequency, amplitude, and phase) back to see if I get a similar signal, the pattern is a little off. I think it has to do with my formula which may be a little incorrect. The formula I'm using to combine the data is: ``` amplitude*sin(2*pi*time*frequency+phase)+amplitude*cos(2*pi*time*frequency+phase); ``` Please note: At the moment I don't want to use IFFT due to the fact that I will be editing the amplitude and frequencies before the calculations are done An image of the plot is below. The top one is the original signal and the bottom one is the signal created with the equation. If you want to know I'm using matlab but I think the problem is with the equation. ![enter image description here](https://i.stack.imgur.com/02Jwb.jpg) tia
Rebuilding original signal from frequencies, amplitude, and phase obtained after doing an fft
CC BY-SA 3.0
null
2011-06-01T22:08:15.603
2018-01-18T09:51:33.130
2011-06-01T22:15:14.557
676,430
676,430
[ "matlab", "fft", "equation-solving" ]
6,208,413
1
6,228,482
null
2
1,824
I'm trying to achieve the following but with no problems in spacing. The image is what I'm trying to achieve but without the spacing problems : ![enter image description here](https://i.stack.imgur.com/0A0PI.png) At the moment it's just a normal listing with tabbing. I want to avoid tabbing by introducing two columns. Is that possible? Current code: ``` \begin{lstlisting}[caption=Elements of time in the background knowledge, label=btime] year(Y):- hour(H):- Y in 2000..2011. H in 0..23. month(M):- minute(M):- M in 1..12. M in 0..59. day_of_month(D):- seconds(S):- D in 1..31. minute(S). date([D, M, Y]):- time([H,M]):- year(Y), hour(H), month(M), minute(M). day_of_month(D). \end{lstlisting} ```
LaTeX - two columns within the same listing?
CC BY-SA 3.0
null
2011-06-01T22:17:51.470
2015-07-27T18:05:05.380
2015-07-27T18:05:05.380
1,677,912
364,387
[ "latex", "listings" ]
6,208,524
1
6,218,579
null
0
1,285
My page has a chart that is set up to display data that is coming from a SqlDataSource. There is a TreeView which contains a list of datapoints that I want to be able to add to the chart as different series. The user selects which item they wish to add by clicking a checkbox in the treeview for that node and then clicks an update button to refresh the chart. Each node's value is set to a column name in the table. If there is only one point selected on the treeview the data comes across as a series on the chart with no problem when the update button is clicked. If multiple items in the treeview are selected an ASP.NET error page appears when clicking the button stating that a column name 'XXXX' was not found where 'XXXX' is the node.Value of the highest item in the tree that was checked. For example an error saying that "Column with name 'X1' was not found" would show up when using the following selection: ![](https://i.stack.imgur.com/cbjxg.png) If just 'X1' is checked the data shows up on the chart. ``` public void UpdateChart(Object sender, EventArgs e) { if (TagTreeView.CheckedNodes.Count > 0) { foreach (TreeNode node in TagTreeView.CheckedNodes) { // Add a series to the chart Series series = new Series(); series=Chart1.Series.Add("Series"+node.Value); series.ChartArea = "ChartArea1"; series.ChartType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), charts[1], true); // create a datasource, add it to the page, SqlDataSource sqlDataSource = new SqlDataSource(); sqlDataSource.ID = "SQLDataSource"+node.Value; sqlDataSource.ConnectionString = ConfigurationManager.ConnectionStrings["HistoricalDataConnectionString"].ConnectionString; if (node.Depth > 1) { if (node.Parent.Text.Contains("AAA")) { MessageBox.Show(node.Value); sqlDataSource.SelectCommand = "SELECT (Date + CONVERT(datetime,Time)) As TimeStamp, " + node.Value + " FROM AAA ORDER BY TimeStamp"; } this.Page.Controls.Add(sqlDataSource); Chart1.DataSourceID = "SQLDataSource"+node.Value; Chart1.Series["Series" + node.Value].XValueMember = "TimeStamp"; Chart1.Series["Series" + node.Value].YValueMembers = node.Value; Chart1.DataBind(); } } } } ``` Is there a way to take each selected item in the TreeView and use the node.value to build a query to add an additional series to the chart? I have done a little bit of work to see if putting the SqlDatasource and Series objects into an array and looping through that but it doesn't seem to be taking me anywhere.
ASP.NET add multiple series to chart via treeview selection
CC BY-SA 3.0
null
2011-06-01T22:34:13.137
2011-06-02T18:18:19.533
2011-06-02T16:08:35.753
78,736
78,736
[ "asp.net", "sql", "treeview", "charts" ]
6,208,792
1
6,208,811
null
0
85
I have two tables, `interviews` and `users`. looks like this: ![Interviews Table](https://i.stack.imgur.com/ibwQA.png) looks like this: ![enter image description here](https://i.stack.imgur.com/tw7av.png) The `id` column in the user table will match the `user` column in the interviews table. How can I select all users that signed up for an interview? (E.g. something along the lines of "select * from interviews left join users on interviews.id <> users.id")
Select users who have not signed up for an interview
CC BY-SA 3.0
null
2011-06-01T23:13:07.920
2011-06-01T23:22:22.367
2011-06-01T23:22:22.367
616,937
616,937
[ "mysql", "select", "join" ]
6,208,980
1
6,209,065
null
19
9,362
I have a list of RGB triplets, and I'd like to plot them in such a way that they form something like a spectrum. I've converted them to HSV, which people seem to recommend. ``` from PIL import Image, ImageDraw import colorsys def make_rainbow_rgb(colors, width, height): """colors is an array of RGB tuples, with values between 0 and 255""" img = Image.new("RGBA", (width, height)) canvas = ImageDraw.Draw(img) def hsl(x): to_float = lambda x : x / 255.0 (r, g, b) = map(to_float, x) h, s, l = colorsys.rgb_to_hsv(r,g,b) h = h if 0 < h else 1 # 0 -> 1 return h, s, l rainbow = sorted(colors, key=hsl) dx = width / float(len(colors)) x = 0 y = height / 2.0 for rgb in rainbow: canvas.line((x, y, x + dx, y), width=height, fill=rgb) x += dx img.show() ``` However, the result doesn't look very much like a nice rainbow-y spectrum. I suspect I need to either convert to a different color space or handle the HSL triplet differently. ![this doesn't look like a spectrum](https://i.stack.imgur.com/gbd2L.png) Does anyone know what I need to do to make this data look roughly like a rainbow? I was playing around with Hilbert curves and revisited this problem. Sorting the RGB values (same colors in both images) by their position along a Hilbert curve yields an interesting (if still not entirely satisfying) result: ![RGB values sorted along a Hilbert curve.](https://i.stack.imgur.com/2B5m8.png)
Sorting a list of RGB triplets into a spectrum
CC BY-SA 3.0
0
2011-06-01T23:43:45.937
2018-07-23T15:54:11.437
2014-11-23T12:40:21.277
2,683
2,683
[ "python", "python-imaging-library", "color-space", "spectrum", "hsv" ]
6,209,060
1
6,243,189
null
1
3,397
I have deleted a branch folder for application, but I am unable to remove the relationship and change icon for the folder ?? Why is that ? ![enter image description here](https://i.stack.imgur.com/jMyFM.jpg)
how to delete a branch and branch relationship
CC BY-SA 3.0
0
2011-06-01T23:58:53.403
2011-06-05T13:24:11.700
null
null
389,288
[ "tfs" ]
6,209,064
1
6,209,111
null
4
38,562
I have this code, and all works well in my local server. The email is sent without any problem. But now I pass the content to webserver, and I get this error... ``` SMTP Error: Could not connect to SMTP host. ``` SSL is enable in the server..correct? so, what is the problem? ![enter image description here](https://i.stack.imgur.com/vcPxd.jpg) ``` $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server $mail->Port = 465; // set the SMTP port $mail->Username = "dnteiro"; // GMAIL username $mail->Password = "xxx"; // GMAIL password ```
SMTP Error: Could not connect to SMTP host
CC BY-SA 3.0
0
2011-06-01T23:59:32.923
2020-03-07T06:21:57.477
2011-06-02T00:10:57.637
560,648
564,979
[ "php", "smtp", "phpmailer" ]
6,209,352
1
6,209,387
null
1
690
Is there a way to get character offset from a position? I have a box that looks like this - ![Polynomial in a richtextbox](https://i.stack.imgur.com/weqxF.png) I want to parse it but I want to detect when it is (which I achieved by setting to What I have is a loop that looks like this so I can acces the position with ``` for (int i = 0; i < Text1.TextLength; i++) { //I can use things here like Text1.Text[i]... } ```
C# .NET RichTextBox GetCharOffsetFromPosition?
CC BY-SA 3.0
null
2011-06-02T00:58:55.947
2011-06-02T01:12:18.507
null
null
1,246,275
[ "c#", ".net", "string", "richtextbox", "superscript" ]
6,209,526
1
null
null
-1
1,365
I am trying to get my button to be exactly the same width and height as my custom uitableviewcell. Here is how I'm trying to do it ``` // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0) { if (indexPath.row == 0) { return cellCode; } if (indexPath.row == 1) { cellManufacture.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cellManufacture; } if (indexPath.row == 2) { cellModel.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cellModel; } if (indexPath.row == 3) { cellYear.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cellYear; } } submitButton.frame = cellSubmit.bounds; //<<<<<<HERE IS WHERE I SET SIZING :) return cellSubmit; } ``` however this is the result I get.... ![enter image description here](https://i.stack.imgur.com/WbJZf.png)
how to get uibutton exactly same width and height of custom uitableviewcell
CC BY-SA 3.0
null
2011-06-02T01:35:42.527
2011-06-02T04:07:53.900
null
null
724,746
[ "iphone", "uitableview", "bounds" ]
6,209,580
1
6,210,469
null
2
6,811
On trying to update my working copy, Xcode indicates that there are certain conflicts. A new screen comes up which shows my local file on the left and the server code on the right highlighting whatever conflicts are present. What I'm doing at this stage is, reviewing my code and make necessary changes using this tool: ![enter image description here](https://i.stack.imgur.com/5hBQZ.png) When I'm finally done reviewing and making changes to my code as necessary, I'd like to update my project with the changes I've made. However the update button at the bottom is still disabled. What is it that I'm missing here? How do I convey to Xcode that I'm done making changes and it may update the project?
How to resolve conflicts in xcode 4 when using SVN?
CC BY-SA 3.0
null
2011-06-02T01:47:27.337
2013-02-11T21:06:16.543
2011-06-02T02:40:20.290
558,423
558,423
[ "iphone", "ios", "svn", "xcode4" ]
6,209,659
1
6,209,710
null
2
563
![enter image description here](https://i.stack.imgur.com/tu2G3.png)i am designing a project in .net 4.0 using mvc3. I am using two attribute `name` and `fname`(father name). my controller class: loginController.cs ``` using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Web; using System.Web.Mvc; using MvcMovie.Models; namespace MvcMovie.Controllers { public class loginController : Controller { private logindata db = new logindata(); // // GET: /login/ public ViewResult Index() { return View(db.loginobj.ToList()); } // // GET: /login/Details/5 public ViewResult Details(int id) { // login login = db.loginobj.Find(id); login login = db.loginobj.Find(2) ; return View(login); } // // GET: /login/Create public ActionResult Create() { return View(); } // // POST: /login/Create [HttpPost] public ActionResult Create(login login) { if (ModelState.IsValid) { db.loginobj.Add(login); db.SaveChanges(); return RedirectToAction("Index"); } return View(login); } // // GET: /login/Edit/5 protected override void Dispose(bool disposing) { db.Dispose(); base.Dispose(disposing); } } } ``` model class ``` using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data.Entity; login.cs namespace MvcMovie.Models { public class login { public int ID { get; set; } public string name{get; set;} public string fname { get; set; } } public class logindata : DbContext { public DbSet<login> loginobj { get; set; } } } ``` view.cshtml ``` @model IEnumerable<MvcMovie.Models.login> @{ ViewBag.Title = "Index"; } <h2>Index</h2> <p> @Html.ActionLink("Create New", "Create") </p> <table> <tr> <th> name </th> <th> fname </th> <th></th> </tr> @foreach (var item in Model) { <tr> <td> @Html.DisplayFor(modelItem => item.name) </td> <td> @Html.DisplayFor(modelItem => item.fname) </td> <td> @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | @Html.ActionLink("Details", "Details", new { id=item.ID }) | @Html.ActionLink("Delete", "Delete", new { id=item.ID }) </td> </tr> } </table> ``` I want to ask that where is data stored which is created by me? means how can I see that table of entries which is done by me? whenever i click of .sdf file then there is a problem occured as shown in following picture, what should i do to solve this problem. should i installed something. i installed visual studio 2010 and sql server 2008.
where is data stored?
CC BY-SA 3.0
0
2011-06-02T02:01:28.060
2011-08-29T19:30:06.010
2020-06-20T09:12:55.060
-1
887,872
[ "c#", ".net", "database", "asp.net-mvc-3" ]
6,209,989
1
null
null
0
2,209
The original URL: [http://www.example.com/articles/articles/filename.pdf](http://www.example.com/articles/articles/filename.pdf) and others in that directory are now at: [http://www.example.com/articles/filename.pdf](http://www.example.com/articles/filename.pdf) ![The "URL Rewrite" module](https://i.stack.imgur.com/pbRZu.png) ![The URL Rewrite editor pane](https://i.stack.imgur.com/ba92v.png) ![Editing the rewrite rule](https://i.stack.imgur.com/aasHS.png) We have lots of old links we don't control, however, that point to the first URL. I have a shared IIS 7 account that has an enabled "URL Rewrite" However, I am having difficulty with the actual implmentation. For example, I'm using this matching pattern: [http://www.example.com/articles/articles/](http://www.example.com/articles/articles/)(.*)$ and, according to the test dialog, it catches every instance of file in that directory. On the other end, I've specified a Redirect action, where the redirect URL pattern is: [http://www.example.com/articles/](http://www.example.com/articles/){R:1}. That seems like that should do it. I apply my changes, restart the app pool and... nothing happens when I enter the first URL. TIA!
IIS redirect for files that have changed paths
CC BY-SA 3.0
null
2011-06-02T03:13:44.060
2011-06-06T12:53:46.410
2011-06-04T13:17:14.540
479,709
479,709
[ "iis-7", "redirect", "shared-hosting" ]
6,210,389
1
6,210,721
null
1
1,071
I am trying to understand the basic concepts around the co-ordinates system in OpenGL so I have been making a test application from guides online. Presently I have drawn a simple Square to the screen, using simple Co-ordinates of: ``` -1.0f, 1.0f, 0.0f, // 0, Top Left -1.0f, -1.0f, 0.0f, // 1, Bottom Left 1.0f, -1.0f, 0.0f, // 2, Bottom Right 1.0f, 1.0f, 0.0f, // 3, Top Right ``` In my application I run the following code: ``` GLU.gluPerspective(gl, 45.0f, (float) width / (float) height, 0.1f, 100.0f); ``` My basic understanding here is that the code is setting the viewing port angle to 45 degrees and the width to height ratio of the window size. Another thing I am doing is setting the viewing position as -4 units on the Z axis:`gl.glTranslatef(0, 0, -4);` This is what the result looks like in Landscape... ![Landscape](https://i.stack.imgur.com/2iRTG.png) And in Portrait... ![Portrait](https://i.stack.imgur.com/rt6SH.png) --- My questions are: How does the co-ordinate system work, how many Pixels does one unit represent? How does changing the orientation and width to height ratio effect the equation? If I wanted to draw a square the size of the screen, with a View Port of 45 degrees and a Viewing position of z-4... how does one figure out the required width and height in units?
Android OpenGL Coordinates Question
CC BY-SA 3.0
0
2011-06-02T04:31:26.813
2011-06-02T05:17:46.337
2011-06-02T04:46:06.487
44,729
613,903
[ "android", "opengl-es" ]
6,210,628
1
6,228,138
null
0
111
I ran my app twice (in the VS ide). The first time it took 33seconds. I decommented obj.save which calls a lot of code and it took 87seconds. Thats some slow serialization code! I suspect two problems. The first is i do the below ``` template<class T> void Save_IntX(ostream& o, T v){ o.write((char*)&v,sizeof(T)); } ``` I call this templates hundreds of thousands of times (well maybe not that much). Does each .write() use a lock that may be slowing it down? maybe i can use a memory steam which doesnt require a lock and dump that instead? Which ostream may i use that doesnt lock and perhaps depends that its only used in a single thread? The other suspected problem is i use dynamic_cast a lot. But i am unsure if i can work around this. Here is a quick profiling session after converting it to use fopen instead of ostream. I wonder why i dont see the majority of my functions in this list but as you can see write is still taking the longest. Note: i just realize my output file is half a gig. oops. Maybe that is why. ![enter image description here](https://i.stack.imgur.com/0lY7r.png)
Profiling serialization code
CC BY-SA 3.0
null
2011-06-02T05:04:50.430
2011-06-03T14:38:25.093
2011-06-02T05:56:59.350
null
null
[ "c++", "optimization", "profiling", "ostream" ]
6,210,642
1
6,210,892
null
0
212
hii every one i am new to iphone, i have done a sample data entry project in that i am saving data into the sqlite then displaying the saved data in the table view , & then on click of each row of the table it will go to other page (grouped table view where i am displying detailed data) now i have the table view like this ![screen shot](https://i.stack.imgur.com/XSQey.png) on click of each row it will go to detailed view like this ![Screen shot](https://i.stack.imgur.com/7e01B.png) then on click of back button it ill come back to data list screen but it ill add some other data into the screen like this ![enter image description here](https://i.stack.imgur.com/lesiy.png) i am using reload data in view will apear ,, is that causing this problem?it works fine if i comment that n try,, can any one help me thanx in advance
getting some values in the table view rows in an iphone app
CC BY-SA 3.0
null
2011-06-02T05:05:58.777
2011-06-02T07:11:41.667
null
null
760,838
[ "iphone", "objective-c", "uitableview" ]
6,210,860
1
6,211,057
null
1
108
In the below image, what is the UI control used to create the "Other Network" dialog? We need to create a similar non-full-screen popup. ![enter image description here](https://i.stack.imgur.com/kTnVy.png)
iPad - General Network->What is the UI control?
CC BY-SA 3.0
0
2011-06-02T05:38:19.230
2011-06-02T06:07:16.147
null
null
172,861
[ "ipad" ]
6,210,959
1
6,210,996
null
6
4,981
I'm interested in ways to render a span that to look something like one of these: ![some random images of stamps](https://i.stack.imgur.com/aGCSB.png) Here are the tricks I plan on using: - `@font-face`- `-{moz/webkit/o}-transform:rotate` It's for a personal project so assuming the most modern CSS support is fine. Maybe border-images could help? I'd like to avoid image splicing all over the place -- if it really comes down to that I'll just skip the border all together and rely on a font for the look. I'm just curious how the CSS gurus around here would approach this. There is now a CSS property for this, `mask-image`. More [here](http://trentwalton.com/2011/05/19/mask-image-text/).
Any ideas about how to use CSS to emulate a messy stamp?
CC BY-SA 3.0
null
2011-06-02T05:53:21.690
2022-09-06T18:10:07.100
2012-02-13T18:18:40.647
null
null
[ "css", "text-styling" ]
6,211,045
1
null
null
1
197
I've just run Intrument's Memory Leaks Tool for my app and am getting the following errors: ![enter image description here](https://i.stack.imgur.com/IvJe9.png) Here is the method it is referring to: Specficlaly at this line: `NSSet *filteredExercisesFromSession = [session.exercises filteredSetUsingPredicate:[NSPredicate predicateWithFormat: @"name == %@", selectedExerciseName]]` ``` - (void)createSession { NSCalendar *calendar = [NSCalendar currentCalendar]; unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit; NSDateComponents *dateComponentsForToday = [calendar components:unitFlags fromDate:self.picker.date]; [dateComponentsForToday setHour:0]; [dateComponentsForToday setMinute:0]; [dateComponentsForToday setSecond:0]; NSDate *targetDateBegins = [calendar dateFromComponents:dateComponentsForToday]; NSDate *targetDateEnds = [targetDateBegins dateByAddingTimeInterval:(60 * 60 * 24 - 1)]; NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; [fetchRequest setPredicate:[NSPredicate predicateWithFormat: @"(timeStamp >= %@ && timeStamp <= %@)", targetDateBegins, targetDateEnds]]; [fetchRequest setEntity:[NSEntityDescription entityForName:@"Session" inManagedObjectContext:managedObjectContext]]; NSError *error = nil; NSArray *results = [managedObjectContext executeFetchRequest:fetchRequest error:&error]; NSLog(@"Fetch error: %@", error); if ([results count]) { session = (Session *)[results objectAtIndex:0]; NSLog(@"Already have session for date: %@", session.timeStamp); } else { session = (Session *)[NSEntityDescription insertNewObjectForEntityForName:@"Session" inManagedObjectContext:managedObjectContext]; session.timeStamp = self.picker.date; NSLog(@"New session for date: %@", session.timeStamp); } NSSet *filteredExercisesFromSession = [session.exercises filteredSetUsingPredicate:[NSPredicate predicateWithFormat: @"name == %@", selectedExerciseName]]; if ([filteredExercisesFromSession count] > 0) { self.exercise = [filteredExercisesFromSession anyObject]; } else { NSLog(@"exercise does not already exist"); self.exercise = (Exercise *)[NSEntityDescription insertNewObjectForEntityForName:@"Exercise" inManagedObjectContext:managedObjectContext]; self.exercise.name = selectedExerciseName; [session addExercisesObject:exercise]; NSLog(@"exercise name: %@", exercise.name); NSLog(@"exercises in session: %@",session.exercises); } if (![managedObjectContext save:&error]) { // Handle the error. } NSLog(@"Save error: %@", error); [fetchRequest release]; self.fetchedResultsController = nil; [setsTableView reloadData]; } ```
Need Help With Memory Leaks
CC BY-SA 3.0
0
2011-06-02T06:05:27.500
2011-06-02T07:53:07.393
null
null
null
[ "iphone", "objective-c", "core-data", "memory-leaks" ]
6,211,326
1
6,302,329
null
0
1,068
I have a `DashBoard` view. On clicking on `Assign` button a ModalPopup Opens like : ![PopUpView](https://i.stack.imgur.com/Ud5ln.jpg) Code for opening PopUp ``` $create(AjaxControlToolkit.ModalPopupBehavior, { "BackgroundCssClass": "modalBackground", "DropShadow": false, "OkControlID": "OkButton", "OnOkScript": "onOk()", "PopupControlID": "div_to_popup", "id": "PopUpBox" }, null, null, $get("day"+a)); function onOk(){ // what to write here to save data on server } ```
AjaxControlToolkit ModalPopup in Asp.net MVC
CC BY-SA 3.0
null
2011-06-02T06:45:26.070
2011-06-10T05:25:47.250
2011-06-02T08:42:18.897
38,055
508,106
[ "asp.net", "ajaxcontroltoolkit" ]
6,211,424
1
null
null
6
29,867
![enter image description here](https://i.stack.imgur.com/K6RVF.png)Hi All, My Question is simple but please keep in mind I'm not binding it to any grid or any of ASP.NET control I have my own grid control and I want to keep it as a DateTime Column for sorting purpose. I'm creating DataTable With Column Type DateTime. ``` DataTable data = new DataTable(); data.Columns.Add("Invoice Date", typeof(DateTime)); DataRow dr = data.NewRow(); dr[0] = DateTime.Now; //Adding filled row to the DataTable object dataTable.Rows.Add(dr); ``` When the Value is shown on ASP.NET page it is show something like this: ``` "2/28/2011 12:00:00 AM" ``` I have 2 columns like this, In 1 column I want to show just date and in other column i want to show date as "Dec 2011", these formats can be achieved if i use DataColumn with type string but in that case sorting is not working properly. Please help. Thanks.
How to set only Date in DataTable Column of Type DateTime WEB
CC BY-SA 3.0
null
2011-06-02T06:57:47.320
2011-06-02T07:49:58.277
2011-06-02T07:49:58.277
466,594
466,594
[ "c#", "datetime", "formatting", "datatable" ]
6,211,645
1
6,212,816
null
4
1,379
![Number of Active installs exceeds total downloads](https://i.stack.imgur.com/Ip1y1.jpg) I am wondering how the active installs exceeds the total installs. I suspect some one copied the app and installed on another phone...Can anyone post if it is possible some other way?
Android Market- Number of Active installs exceeds total downloads
CC BY-SA 3.0
0
2011-06-02T07:23:09.637
2011-06-02T09:42:48.697
2011-06-02T07:40:00.957
527,541
527,541
[ "android", "google-play" ]
6,211,695
1
6,211,717
null
8
45,480
I have a SQL query in which I am getting some records. Query is: ``` select c.Id, c.FirstName, dbo.GetClientStaffContacts(c.Id, '27,31') as Staff from Client c order by c.Id ``` Result is: ![enter image description here](https://i.stack.imgur.com/KyOzB.png) I want only those rows that are not having null values in column Staff. Any help would be appreciated. Thank you.
How to remove null rows from sql query result?
CC BY-SA 3.0
0
2011-06-02T07:29:04.083
2011-06-02T07:31:47.910
null
null
669,448
[ "sql-server-2008", "null" ]
6,211,784
1
null
null
6
8,270
I try to make buttons like those on the desk of android: ![enter image description here](https://i.stack.imgur.com/ZJfuf.png) This button are similar to the uisegmentedcontrol for Iphone. I don't find a easy way to do this in Android. For the moment, I use the Button explain here: [http://blog.bookworm.at/2010/10/segmented-controls-in-android.html](http://blog.bookworm.at/2010/10/segmented-controls-in-android.html) But the result seems not so good compared to the desk button. There is no round corner, alpha, etc... Is there an easy way to use the same button than the desk button?
segmented controls type in Android app
CC BY-SA 3.0
0
2011-06-02T07:39:45.727
2013-03-13T09:21:50.810
2013-03-13T09:21:50.810
73,488
780,724
[ "android", "android-layout", "uisegmentedcontrol" ]
6,211,805
1
6,211,872
null
4
2,389
What is the fastest way to find if a point is in a rectangle I have two points which are the of the rectangle, and a number which is . I hope this is clear. The rectangle is (probably) not aligned with the axis. I am wondering if there may be a faster algorithm given this data then calculating the four corners, rotating, etc. An idea I though of but am not sure how to implement (having trouble with the math) was to find the distance from the point to the line traced between the two centers, and if it is less then half the length of the side of the rectangle and also then it is in the rectangle. I don't know how to explain this better. Maybe the picture will help explain:![explanation](https://i.stack.imgur.com/XTh2L.png) A, B, C are given, as well as the length of side A/B. Basically I thought that if CD is less then half of side A and D is on AB, the point is in the rectangle. But how do I do this? Instead of finding D to see if it is on AB, check if angles ABC and BAC are acute, but I still don't know how to do this.
Point in rectangle
CC BY-SA 3.0
0
2011-06-02T07:42:29.230
2011-06-03T07:02:00.557
2011-06-03T07:02:00.557
331,785
331,785
[ "algorithm", "point-in-polygon" ]
6,211,925
1
6,212,316
null
2
247
I'd like to show revisions of text, and I love how StackOverflow does it (e.g. see below). Is there an open source .NET code that can receive two texts and output such a result? If you know of a paid solution that may also be relevant, thanks. ![enter image description here](https://i.stack.imgur.com/Zpn19.png)
Text revision comparison StackOverflow-style for ASP.NET MVC?
CC BY-SA 3.0
0
2011-06-02T07:58:15.997
2011-06-02T08:47:26.980
null
null
103,532
[ "asp.net-mvc", "text-comparison" ]
6,211,990
1
6,224,685
null
0
1,096
I have an Intraweb application which is using the TTIWDBAdvWebGrid component. Two columns of the grid are comboboxes (editor is set to edCombo) - look at the picture below ![enter image description here](https://i.stack.imgur.com/2r1Rw.jpg) What I want is that when one of the comboboxes is changed the other changed it's value to opposite (if first is YES then the other is NO). I've tried with javascript code at the ClientEvents-combochange ``` valcb=GetEditValue(IWDBGESTANTObj,c,r); if (c==5 ) { if (valcb='OUI ') {SetCellValue(IWDBGESTANTObj,6,r,'NON'); } else {SetCellValue(IWDBGESTANTObj,6,r,'OUI');} } ``` but this code changed the values from the second combo to nothing.... How can I resolve this?
Delphi 7 - TMS Intraweb DB-aware Grid ComboBox
CC BY-SA 3.0
0
2011-06-02T08:06:49.183
2016-07-21T10:50:22.550
2020-06-20T09:12:55.060
-1
368,364
[ "javascript", "delphi", "combobox", "intraweb", "tms" ]
6,212,469
1
6,212,581
null
2
2,088
![enter image description here](https://i.stack.imgur.com/aCVEn.png) I have a problem with asp:button styling. I added following style: ``` .myAspButton { background-image: url("image for button"); width: 110px; height: 25px; color: white; font-weight: bold; vertical-align: middle; } <asp:Button ID="btnAsp" runat="server" Text="hhh" CssClass="myAspButton" BackColor="Transparent" BorderStyle="None" /> ``` 1. Problem is when I press button it gets that dotted border around how to remove this? 2. And also what property to use to change button style when button is pressed down?
Dotted border around ASP.NET Button
CC BY-SA 3.0
null
2011-06-02T09:05:22.407
2014-09-09T13:17:36.523
2011-12-25T01:06:26.047
106,224
480,231
[ "asp.net", "css", "button" ]
6,212,482
1
6,212,529
null
1
807
I am still clueless how to start preparing a form like this on MVC 3. I am a beginner and all I have learned till now is to bind data from controller to the strongly typed view. But as I know that we can return only one varibale from the return statment public ActionResult(int id) { // Do some logic return View(role); } Now the above code return the role list to the view. But how would I pass other details also like Licence state, organization.. etc * Another complex example: Let say my form need to display details like Country [drop down], State [Drop down], Department [ComboBox list], Organization [radio button list], List of all employee [table/Grid] How would I display all the controls value with single RETURN? Note: * I assume that all the detials like role, Licence state, Organization etc I am fetching from database. I hope I am clear with my explanation, please let me know if I need to explain it bit further. ![enter image description here](https://i.stack.imgur.com/JyuUu.jpg)
How to load multiple controls in a view
CC BY-SA 3.0
0
2011-06-02T09:07:16.353
2011-06-02T09:12:22.047
null
null
609,582
[ "asp.net-mvc-3", "view", "controller", "razor" ]
6,212,818
1
6,213,590
null
-1
131
In my winform application want to cover full computer monitor. But, windows 7 task bar visible. how to code Monitor fit application in winform? ![see statusStrip1](https://i.stack.imgur.com/E44sz.png) thanks in advance!.
how to do Monitor fit application in winform?
CC BY-SA 3.0
null
2011-06-02T09:42:53.623
2012-05-04T13:43:32.620
2011-06-02T10:40:29.247
776,226
776,226
[ "winforms" ]
6,213,017
1
6,219,018
null
1
4,498
All, I need to know how to stretch an image for further work. for example, I have the next two images: ![enter image description here](https://i.stack.imgur.com/gQdo7.jpg) ![enter image description here](https://i.stack.imgur.com/iG1d5.jpg) I want that the numbers will fill the entire square like this: ![enter image description here](https://i.stack.imgur.com/HhvW1.jpg) ![enter image description here](https://i.stack.imgur.com/57HzP.jpg) any help will be greatly appreciated.
How to stretch an image in Matlab
CC BY-SA 3.0
null
2011-06-02T09:59:58.020
2011-06-03T17:30:35.343
null
null
556,011
[ "matlab", "image-processing" ]
6,213,054
1
6,215,282
null
1
692
We allow users to create blog entries via front end. but for some reason the tinymce editor doesn't have image upload button. Authors have to drag the image from their desktop to tinymce to insert an image. is there a way to add image button allowing authors to upload images and using them in their blog? Also just realised, there is no "Link" button either ![screen shot](https://i.stack.imgur.com/YgvTa.jpg)
Silverstripe - Blog module blog entry via front end but image upload/insert button missing from tinymce
CC BY-SA 3.0
null
2011-06-02T10:04:38.050
2011-06-02T13:36:54.770
null
null
462,955
[ "tinymce", "blogs", "silverstripe" ]
6,213,190
1
null
null
2
405
I have a `Canvas` with two or more objects. Now, I put these objects in a new `Canvas` placed in the previous `Canvas`. Then, I rotate it. Now, I want to know how to get the positions of the objects in the new `Canvas`, as though there were no new canvas. ![Image1](https://i.stack.imgur.com/rMPU8.jpg)
get XY of object in wpf for this situation?
CC BY-SA 3.0
null
2011-06-02T10:17:27.630
2015-08-21T02:54:55.873
2015-08-21T02:54:55.873
64,046
496,841
[ "wpf", "canvas", "transform" ]
6,213,586
1
null
null
1
2,557
I need to implement datagridview selection in that way so when user clicks a cell whole row is selected, when user holds CTRL key additional rows are selected, when user holds SHIFT key range of rows are selected. According to requirement I cannot show RowHeaders so selection should be based on cell clicking. I also know that `datagridview.SelectionMode = FullRowSelect` will do the trick but I'm getting one problem when using SHIFT for selection - gaps. When someone selects one row, then presses SHIFT and then jumps over few row to select anoter not all cells became selected(look at the picture - rows with x=3,4,5 have cells which are not selected). ![enter image description here](https://i.stack.imgur.com/QRgWG.png) Help me to solve this problem. Actually I have some ideas. For example, somehow treat clicking on a cell as clicking on a rowheader, but I'm not sure how to implement this.
C# datagridview row select with CTRL and SHIFT
CC BY-SA 3.0
null
2011-06-02T10:55:06.637
2011-10-19T14:03:15.060
2011-06-06T21:54:57.667
2,660
371,967
[ "c#", "winforms", "datagridview" ]
6,213,789
1
6,281,121
null
2
6,481
In my iPad program I have an array which holds images. How can I display my all images (from an image array) in my viewController the same as the below screen shot? Is there a good way to do it, any sample application paths to refer or sample code? I need the following functionality. 1. Tapping an image will show it full screen 2. A close button to close this view as the same as the screen shot. 3. Two buttons to display the remaining and previous images. A sample screen shot is attached below. We can see that the below application is showing all images at the right side of the screen. ![enter image description here](https://i.stack.imgur.com/yEZN8.jpg)
How can I display my images in my viewController the same as the below screen shot?
CC BY-SA 3.0
0
2011-06-02T11:14:38.403
2011-06-30T19:13:53.777
2011-06-30T19:13:53.777
63,550
686,849
[ "objective-c", "ios", "xcode", "ipad", "photolibrary" ]
6,214,020
1
6,214,135
null
0
362
I am working on a project in which ![](https://i.stack.imgur.com/RK1vJ.png) As you can see that there is a horizontal view in which images are shown. I have provide facility of scroll. Therefore I have put `UIView` on `UIScrollView` than after `UIButton` on `UIView`. Images on `UIButton` come from plist. Problem is that when I delete the selected image from the plist I am unable to reload data so that deleted image is removed from horizontal view. Can anyone help me in reload data?
How to reload data in UIView
CC BY-SA 3.0
null
2011-06-02T11:38:00.803
2011-06-02T11:53:20.507
2011-06-02T11:53:20.507
310,121
779,422
[ "ipad" ]
6,214,125
1
6,214,276
null
9
1,138
I am using fbconnect api in my project.When the login dialog gets opened where we entered our credentials ,when I click on login button there is something performed and it is redirected to the publish page. My problem is I am not getting which action is performed on that login button so that I can put an indicator over there. I have attached a screenshot to specify which button I am talking about. ![enter image description here](https://i.stack.imgur.com/I04Fk.png) Any suggestions will be highly appreciated!
Button Action on login Button click in FBConnect API
CC BY-SA 3.0
0
2011-06-02T11:47:49.597
2011-08-30T10:13:55.223
2011-08-30T10:13:39.013
491,980
633,676
[ "iphone", "objective-c", "ios", "fbconnect" ]
6,214,306
1
6,215,884
null
-3
293
I am having 2 tables with a relation of one to many For example take example of student and performance tables. Here a student and performance tables have one to many relationship ![enter image description here](https://i.stack.imgur.com/Vcf7n.png) ![enter image description here](https://i.stack.imgur.com/5ETKW.png) Now i have to write a stored procedure which takes input as multiple student id, student name and section details as datatable and tells whether all the records passed in datatable have the same values for percentage, subject id, other activities in performance table or not . Any suggestions are helpful
Check data is same for one or more records using T SQL
CC BY-SA 3.0
null
2011-06-02T12:07:21.393
2011-06-02T15:47:23.233
2011-06-02T13:19:53.210
322,022
322,022
[ "sql", "sql-server" ]
6,214,763
1
6,215,222
null
1
2,101
HI, In Visual Studio 2010 I select Add new connection and then I chose Oracle server. Then I choose Oracle provider for .Net. And this window comes. ![enter image description here](https://i.stack.imgur.com/pNAis.jpg) I wonder what I should write in the Data Source text field if I the Oracle database is at server with name AZSSRV and IP address 172.117.17.1 ? Any help will be appreciated
Connect to Oracle in remote server with .NET
CC BY-SA 3.0
0
2011-06-02T12:54:07.333
2012-08-28T12:29:39.657
null
null
751,796
[ "database", "oracle", "visual-studio-2010", "connect" ]
6,214,797
1
null
null
1
2,428
I have a SharePoint 2010 web application that will be accessed by internal employees and outside partners which I would like to use the same url. I have it set up for Claims based authentication with Windows and Forms based authentication enabled. The default login page looks as follows: ![enter image description here](https://i.stack.imgur.com/orv0q.png) I would like to edit the text in the drop-down menu to say "Internal Employees" instead of "Windows Authentication" and "External Partners" instead of "Forms Authentication" as well as change the red error image to the company logo.
How do I customize the SharePoint 2010 claims based login page?
CC BY-SA 3.0
null
2011-06-02T12:57:08.893
2011-11-30T21:50:41.517
null
null
203,798
[ "sharepoint-2010", "authentication" ]
6,215,259
1
6,215,483
null
3
861
Good day! I am a newbie on creating database... I need to create a db for my recruitment web application. My database schema is as follows: ![enter image description here](https://i.stack.imgur.com/IN3uL.jpg) NOTE: I included the applicant_id on other tables... e.g. exam, interview, exam type. Am i violating any normalization rule? If i do, what do you recommend to improve my design? Thank you
Am i violating any NF RULE on my database design?
CC BY-SA 3.0
null
2011-06-02T13:34:41.637
2011-06-03T14:47:51.173
2011-06-03T14:47:51.173
525,965
525,965
[ "database-schema" ]
6,215,388
1
null
null
5
1,304
Could anyone please point out the meaning of the graph below: ![enter image description here](https://i.stack.imgur.com/UCbZU.png) 1. What is the relationship between PolicyLayer and PolicyServiceInterface 2. What is the relationship between PolicyServiceInterface and MachanismLayer. C# code would be also appreciated! Please note that the UML is from Agile Principles, Patterns, and Practices in C# By Martin C. Robert, Martin Micah 2006. Do the following have the same meaning: 1) A solid line with a triangle at one end 2) A dashed line with a triangle at one end What is the difference between: 1) A solid line with an arrow at one end 2) A dashed line with an arrow at one end Example in thie sample and PersistentObject and ThirdPartyPersistentSet in the link below: [UML help C# Design Principles](https://stackoverflow.com/questions/6208308/uml-help-c-design-principles/6208441) Can the relationship between PolicyLayer and PolicyServiceInterface as below: ``` public class PolicyLayer { private PolicyServiceInterface policyServiceInterface = new PolicyServiceInterfaceImplementation(); } class PolicyServiceInterfaceImplementation:PolicyServiceInterface {} ``` Regarding
UML help C# Design Principles
CC BY-SA 3.0
0
2011-06-02T13:46:21.740
2019-08-10T23:50:54.787
2017-05-23T11:53:28.290
-1
665,335
[ "c#", "oop", "uml", "design-principles" ]
6,215,472
1
6,215,577
null
1
620
I want to create uitableview like the following , also I need to add a third section that contains rows ![enter image description here](https://i.stack.imgur.com/zWm4Z.png) any suggestion please
How to create custom uitableview like that
CC BY-SA 3.0
null
2011-06-02T13:52:55.970
2011-06-02T13:59:40.070
null
null
712,104
[ "iphone", "ipad" ]
6,215,603
1
6,215,708
null
1
517
I have successfully downloaded and installed AJAX framework, and the control toolkit. While trying to insert any AJAX controls such as UpdatePanels or ScriptManagers into an existent ASP.NET Web Site (which currently has no AJAX functionalities) I get the following error: "Attempret do read or write protected memory. This is often an indicator that other memory is corrupt." So as a test, I've created a brand new project, as an ASP.NET AJAX-Enabled Web Site, as follows: --- ![enter image description here](https://i.stack.imgur.com/rw89o.png) --- And in the default page of this project there is an ScriptManager already, and I've been able to insert an UpdatePanel, do a little test with a label and a button updating its content to the current time. The question is: What does an "ASP.NET AJAX-Enabled Web Site" have that an "ASP.NET Web Site" does not that prevents me from adding AJAX controls ?
Turning an ASP.NET Website into an AJAX-Enabled one
CC BY-SA 3.0
null
2011-06-02T14:02:32.527
2014-12-16T08:48:28.660
2011-07-06T17:16:11.107
208,670
208,670
[ "c#", ".net", "asp.net" ]
6,215,765
1
6,215,829
null
1
78
Simple question about best-practice. I'm using Kohana... is it okay to use helpers in views? For example, to use . I could pass it from controller, you know. I assume it's okay, because there are helpers like HTML that is meant to be used in views, right? ![enter image description here](https://i.stack.imgur.com/obk9m.png)
Is It Okay to use helpers in views?
CC BY-SA 3.0
null
2011-06-02T14:18:23.567
2011-06-02T15:13:25.197
2011-06-02T14:23:17.510
171,742
458,610
[ "url", "kohana", "helper" ]
6,215,920
1
null
null
0
158
I was wondering if anyone could point out what is causing the problem in the screenshot attached. It has happened a couple of times with different images. I can't see what is causing it. The machine is my development machine. I was hoping to post this on serverfault but I can't add the image I need.![Apache Error Log](https://i.stack.imgur.com/3aOpU.png)
Apache error log showing very strange problems
CC BY-SA 3.0
null
2011-06-02T14:30:05.423
2011-06-02T14:42:21.270
null
null
298,172
[ "apache", "error-log" ]
6,216,209
1
6,441,048
null
4
7,885
I have an applications that connects to a web service that uses an Entrust valid certificate. The only difference is that it's a wildcard SSL. The problem is : I get an ``` ERROR/NoHttpResponseException(5195): org.apache.http.NoHttpResponseException: The target server failed to respond ``` when I'm on 3G. When on WIFI it works, on simulator it works, tethering the simulator trough my phones 3G works. But the app on my phone from 3G dosen't work at all. Tested on a HTC Legend CM7.0.3(2.3.3) and Nexus S 2.3.3 on 2 different network(Virgin Mobile Canada and Fido). I have a PCAP dump from my device that show some error, but I don't understand it really well. Acknowledgement number: Broken TCP. The acknowledge field is nonzero while the ACK flag is not set I tried the fix on this [question](https://stackoverflow.com/questions/995514/https-connection-android) this [question](https://stackoverflow.com/questions/3135679/android-httpclient-hostname-in-certificate-didnt-match-example-com-exa) too. I don't know where else to go. By the way, the web service work with the browser on 3G. We are also using basic auth with HttpRequestInterceptor. I think this is all the details I can give. If something else is needed feel free to ask. This [question](https://stackoverflow.com/questions/2052299/httpclient-on-android-nohttpresponseexception-through-umts-3g) is related too, I've tried both fix, none of them work. # Edit I'm starting to think that this could be better suited for serverfault.com This is the dump [file](http://livinloud.ca/documents/dump-not-working-3g.pcap) and the screenshot ![PCAP](https://i.stack.imgur.com/6AAvB.png) # Edit 2 This is the code I'm using to connect to the web service in question. ``` protected HttpEntity sendData(List<NameValuePair> pairs, String method) throws ClientProtocolException, IOException, AuthenticationException { pairs.add(new BasicNameValuePair(KEY_SECURITY, KEY)); pairs.add(new BasicNameValuePair(LANG_KEY, lang)); pairs.add(new BasicNameValuePair(OS_KEY, OS)); pairs.add(new BasicNameValuePair(MODEL_KEY, model)); pairs.add(new BasicNameValuePair(CARRIER_KEY, carrier)); DefaultHttpClient client = getClient(); HttpPost post = new HttpPost(); try { post.setHeader("Content-Type", "application/x-www-form-urlencoded"); post.setEntity(new UrlEncodedFormEntity(pairs)); } catch (UnsupportedEncodingException e1) { Log.e("UnsupportedEncodingException", e1.toString()); } URI uri = URI.create(method); post.setURI(uri); client.addRequestInterceptor(preemptiveAuth, 0); HttpHost target = new HttpHost(host, port, protocol); HttpContext httpContext = new BasicHttpContext(); HttpResponse response = client.execute(target, post, httpContext); int statusCode = response.getStatusLine().getStatusCode(); if (statusCode == 401) { throw new AuthenticationException("Invalid username or password"); } return response.getEntity(); } ```
Https connection Android
CC BY-SA 3.0
0
2011-06-02T14:53:02.567
2011-06-27T14:47:43.697
2017-05-23T10:32:35.693
-1
83,253
[ "android", "https" ]
6,216,310
1
6,217,775
null
0
5,170
I'm getting an error when trying to install sharepoint 2010 on the server (windows server 2008 R2 64bit). The prerequisites installed fine, any ideas what this means? ![enter image description here](https://i.stack.imgur.com/kJTG4.png)
Microsoft setup bootstrapper has stopped working
CC BY-SA 3.0
null
2011-06-02T15:01:22.410
2017-01-16T13:05:13.143
null
null
234,531
[ "sharepoint-2010", "installation" ]
6,216,361
1
6,218,006
null
6
183
I have a question on a SQL query and im wondering where to start. Thoughts so far include creating a table in memory with a range of dates, and joining on to it to get the sum of hours entered for a particular day. Just to give an idea of the background of this question here is a little information. The database is structured like so: ![enter image description here](https://i.stack.imgur.com/ePBFs.jpg) The result im trying to achieve with the query im currently writing needs to look like this: ![enter image description here](https://i.stack.imgur.com/bLeJj.jpg) The Query I have written so far: ``` DECLARE @Deleted AS BIT DECLARE @WeekStartDate AS DATETIME DECLARE @WeekEndDate AS DATETIME SET @Deleted = 0 SET @WeekStartDate = '2011/05/01 00:00' SET @WeekEndDate = '2011/05/07 00:00' SELECT [JobSheet].[JobSheetDate], [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode], SUM([JobSheetLineHours].[Hours]) AS TotalCostRateHours, '???' AS 'Mon', '???' AS 'Tue', '???' AS 'Wed', '???' AS 'Thu', '???' AS 'Fri', '???' AS 'Sat', '???' AS 'Sun' FROM [JobSheet] INNER JOIN [JobSheetLine] ON [JobSheetLine].[JobSheetID] = [JobSheet].[JobSheetID] INNER JOIN [JobSheetLineHours] ON [JobSheetLineHours].[JobSheetLineID] = [JobSheetLine].[JobSheetLineID] WHERE [JobSheet].[Deleted]=@Deleted AND [JobSheet].[JobSheetDate] >= @WeekStartDate AND [JobSheet].[JobSheetDate] <= @WeekEndDate AND [JobSheetLine].[Deleted]=@Deleted AND [JobSheetLineHours].[Deleted]=@Deleted GROUP BY [JobSheet].[JobSheetDate], [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode] ``` And this outputs the result set below: ![enter image description here](https://i.stack.imgur.com/0Vovc.jpg) As you can see the result set is almost there, I just need to total the number of hours worked on that particular day, grouping on ContractID, JobID, ProjectID, CostRateCode so I can get the number of hours for each cost rate on each unique project. Is this possible with the current table design? or by using a temporary calendar table for the dates between the two passed in to the query? EDIT: Updated Query: ``` SET DATEFIRST 1 -- Set the first day of week to monday GO DECLARE @Deleted AS BIT DECLARE @RequestedByID AS BIGINT DECLARE @WeekStartDate AS DATETIME DECLARE @WeekEndDate AS DATETIME DECLARE @WaitingForUserID AS BIGINT DECLARE @WaitingForUserTypeID AS BIGINT DECLARE @WaitingForTypeUser AS VARCHAR(50) DECLARE @WaitingForTypeUserType AS VARCHAR(50) SET @Deleted = 0 SET @WeekStartDate = '2009/05/01 00:00' SET @WeekEndDate = '2012/05/07 00:00' SELECT [JobSheet].[JobSheetDate], [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode], SUM([JobSheetLineHours].[Hours]) AS TotalCostRateHours, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 1 THEN SUM(JobSheetLineHours.Hours ) END AS MON, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 2 THEN SUM(JobSheetLineHours.Hours ) END AS TUE, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 3 THEN SUM(JobSheetLineHours.Hours ) END AS WED, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 4 THEN SUM(JobSheetLineHours.Hours ) END AS THU, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 5 THEN SUM(JobSheetLineHours.Hours ) END AS FRI, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 6 THEN SUM(JobSheetLineHours.Hours ) END AS SAT, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 7 THEN SUM(JobSheetLineHours.Hours ) END AS SUN FROM [JobSheet] INNER JOIN [JobSheetLine] ON [JobSheetLine].[JobSheetID] = [JobSheet].[JobSheetID] INNER JOIN [JobSheetLineHours] ON [JobSheetLineHours].[JobSheetLineID] = [JobSheetLine].[JobSheetLineID] WHERE [JobSheet].[Deleted]=@Deleted AND [JobSheet].[JobSheetDate] >= @WeekStartDate AND [JobSheet].[JobSheetDate] <= @WeekEndDate AND [JobSheetLine].[Deleted]=@Deleted AND [JobSheetLineHours].[Deleted]=@Deleted GROUP BY [JobSheet].[JobSheetDate], [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode], CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 1 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 2 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 3 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 4 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 5 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 6 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 7 THEN JobSheetLineHours.Hours END ``` Updated Result Set: ![enter image description here](https://i.stack.imgur.com/7W0zB.jpg) What I'm trying to do now is remove the JobSheetDate from the result set so the Total hours for each day are not all on seperate rows eg. The values for the same contract, project etc are put in the same row, but in the Mon, Tues, Wed etc column, rather than on multiple rows with the hours for one day populated, and the rest of the days null (see screenshot) --- EDIT 2: Updated Query: ``` SET DATEFIRST 1 -- Set the first day of week to monday GO DECLARE @Deleted AS BIT DECLARE @WeekStartDate AS DATETIME DECLARE @WeekEndDate AS DATETIME SET @Deleted = 0 SET @WeekStartDate = '2009/05/01 00:00' SET @WeekEndDate = '2012/05/07 00:00' SELECT --[JobSheet].[JobSheetDate], [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode], SUM([JobSheetLineHours].[Hours]) AS TotalCostRateHours, SUM( CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 1 THEN JobSheetLineHours.Hours END ) AS MON, SUM( CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 2 THEN JobSheetLineHours.Hours END ) AS TUE, SUM(CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 3 THEN JobSheetLineHours.Hours END) AS WED, SUM( CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 4 THEN JobSheetLineHours.Hours END) AS THU, SUM(CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 5 THEN JobSheetLineHours.Hours END ) AS FRI, SUM( CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 6 THEN JobSheetLineHours.Hours END ) AS SAT, SUM( CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 7 THEN JobSheetLineHours.Hours END ) AS SUN FROM [JobSheet] INNER JOIN [JobSheetLine] ON [JobSheetLine].[JobSheetID] = [JobSheet].[JobSheetID] INNER JOIN [JobSheetLineHours] ON [JobSheetLineHours].[JobSheetLineID] = [JobSheetLine].[JobSheetLineID] WHERE [JobSheet].[Deleted]=@Deleted AND [JobSheet].[JobSheetDate] >= @WeekStartDate AND [JobSheet].[JobSheetDate] <= @WeekEndDate AND [JobSheetLine].[Deleted]=@Deleted AND [JobSheetLineHours].[Deleted]=@Deleted GROUP BY --[JobSheet].[JobSheetDate], [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode], CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 1 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 2 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 3 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 4 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 5 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 6 THEN JobSheetLineHours.Hours END, CASE DATEPART(WEEKDAY, JobSheet.JobSheetDate) WHEN 7 THEN JobSheetLineHours.Hours END ``` Results: ![enter image description here](https://i.stack.imgur.com/je5cr.jpg) --- FINAL Update with finished Query: ``` SET DATEFIRST 1 -- Set the first day of week to monday GO DECLARE @Deleted AS BIT DECLARE @WeekStartDate AS DATETIME DECLARE @WeekEndDate AS DATETIME SET @Deleted = 0 SET @WeekStartDate = '2009/05/01 00:00' SET @WeekEndDate = '2012/05/07 00:00' SELECT [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode], SUM([JobSheetLineHours].[Hours]) AS TotalCostRateHours, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Monday WHEN 1 THEN [JobSheetLineHours].[Hours] END ) AS MON, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Tuesday WHEN 2 THEN [JobSheetLineHours].[Hours] END ) AS TUE, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Wednesday WHEN 3 THEN [JobSheetLineHours].[Hours] END ) AS WED, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Thursday WHEN 4 THEN [JobSheetLineHours].[Hours] END ) AS THU, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Friday WHEN 5 THEN [JobSheetLineHours].[Hours] END ) AS FRI, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Saturday WHEN 6 THEN [JobSheetLineHours].[Hours] END ) AS SAT, SUM( CASE DATEPART(WEEKDAY, [JobSheet].[JobSheetDate]) -- Get Total Value for Sunday WHEN 7 THEN [JobSheetLineHours].[Hours] END ) AS SUN FROM [JobSheet] INNER JOIN [JobSheetLine] ON [JobSheetLine].[JobSheetID] = [JobSheet].[JobSheetID] INNER JOIN [JobSheetLineHours] ON [JobSheetLineHours].[JobSheetLineID] = [JobSheetLine].[JobSheetLineID] WHERE [JobSheet].[Deleted]=@Deleted AND [JobSheet].[JobSheetDate] >= @WeekStartDate AND [JobSheet].[JobSheetDate] <= @WeekEndDate AND [JobSheetLine].[Deleted]=@Deleted AND [JobSheetLineHours].[Deleted]=@Deleted GROUP BY [JobSheet].[ContractID], [JobSheet].[ContractCode], [JobSheet].[ContractTitle], [JobSheet].[ProjectID], [JobSheet].[ProjectCode], [JobSheet].[ProjectTitle], [JobSheet].[JobID], [JobSheet].[JobCode], [JobSheet].[JobTitle], [JobSheet].[SageDatabaseID], [JobSheetLineHours].[CostRateCode] ```
Help with a SQL Query
CC BY-SA 3.0
0
2011-06-02T15:05:32.217
2011-06-03T08:18:42.197
2011-06-03T08:18:42.197
428,404
428,404
[ "sql", "sql-server" ]
6,216,487
1
6,216,719
null
9
4,937
I'm just starting [to learn how to print a window in Java/Swing](http://download.oracle.com/javase/tutorial/2d/printing/printable.html). (edit: just found [the Java Printing Guide](http://download.oracle.com/javase/6/docs/technotes/guides/2d/spec/j2d-print.html)) When I do this: ``` protected void doPrint() { PrinterJob job = PrinterJob.getPrinterJob(); job.setPrintable(this); boolean ok = job.printDialog(); if (ok) { try { job.print(); } catch (PrinterException ex) { ex.printStackTrace(); } finally { } } } ``` I get this printer dialog (on Windows XP): ![enter image description here](https://i.stack.imgur.com/eC75K.png) How do I change the page range so it's not 1-9999? edit: using `Pageable`/`Book` to set the page range (as @t_barbz helpfully points out) requires a [PageFormat](http://download.oracle.com/javase/1.4.2/docs/api/java/awt/print/PageFormat.html), in which case I have a catch-22, since I'd like the Print dialog to select that, and I don't seem to get a return value from the print dialog.
java: set page range for print dialog
CC BY-SA 3.0
0
2011-06-02T15:14:09.207
2017-08-08T05:27:11.987
2017-08-08T05:27:11.987
7,098,806
44,330
[ "java", "printing", "range", "printdialog" ]
6,216,632
1
6,216,923
null
0
103
I have got 1 query under another one. I have got problem with the second delete query. I can not delete the right row. It always deletes the last row. The first delete query is ok. it deletes the one i click. here is the screen shot of the output. ![enter image description here](https://i.stack.imgur.com/vEsoX.gif) When i delete burgers it works but when i press delete button for (32) Sauce it deletes the (34) Sauce here is the code: ``` ////////// if we submit then delete item//// if (isset($_POST['DeleteItem'])) { echo "<h1> ID: "; echo $_POST['cartitem_id']; echo " deleted</h1>"; mysql_query("DELETE FROM cartitem WHERE cartitem_id='".$_POST['cartitem_id']."'") or die(mysql_error()); } ////////// if we submit then delete justcart item in item if (isset($_POST['DeleteCartJust'])) { echo "<h1> ID: "; echo $_POST['justcartdelete']; echo " deleted</h1>"; mysql_query("DELETE FROM cartjust WHERE cartjust_id='".$_POST['justcartdelete']."'") or die(mysql_error()); } ?> <table width="100%" border="0" cellpadding="5" cellspacing="5"> <tr> <td width="300"><u>Item</u></td> <td align="center"><u>delete</u></td> </tr> <? $result = mysql_query("SELECT * FROM cartitem WHERE ordertable_id = '$ordertable_id' ORDER BY cartitem_id ASC") or die(mysql_error()); while($row = mysql_fetch_array($result)){ ?> <form action="" method="post"> <tr> <td> <input name="cartitem_id" type="hidden" id="cartitem_id" value="<? echo $row['cartitem_id']; ?>" > <? echo $row['cartitem_name']; ?> <table> <? $result1 = mysql_query("SELECT * FROM cartjust WHERE cartitem_id = '".$row['cartitem_id']."' ORDER BY cartjust_id ASC") or die(mysql_error()); while($row1 = mysql_fetch_array($result1)){ ?> <tr> <td>(<? echo $row1['cartjust_id']; ?>) <input name="justcartdelete" type="hidden" value="<? echo $row1['cartjust_id']; ?>" ></td> <td><? echo $row1['cartjust_name']; ?></td> <td><input type="submit" name="DeleteCartJust" value="Delete"></td> <? } ?> </tr> </table> </td> <td align="center" valign="top"><input type="submit" name="DeleteItem" value="Delete"></td> </tr> </form> <? } ?> </table> ```
i can not delete the right row
CC BY-SA 3.0
null
2011-06-02T15:24:53.933
2011-06-02T15:51:29.687
null
null
489,260
[ "php", "mysql" ]
6,216,709
1
6,218,531
null
2
976
is there anyone who have experienced problems using the latests jQuery version with one of the last releases? I am in process to upgrade to and I was trying to find infos about jqGrid but it seems that they are not yet supporting it. I did some tests and it seems that there are problems: ![enter image description here](https://i.stack.imgur.com/orxKa.png) This is the script I've used: ``` var MyGrid = jQuery("#GroupsGrid"); MyGrid.jqGrid({ url: '/Home/FetchData', postData: { Query: 'aaa' }, datatype: 'json', mtype: 'POST', colNames: ['Nome'], colModel: [ { name: 'Name', index: 'Name', sortable: false, width: 730 } ], pager: '#GroupsPager', rowList: [15, 30, 50], rowNum: 15, width: 794, height: 350, rownumbers: true }); MyGrid.navGrid('#GroupsPager', { edit: false, add: false, del: true, search: false }, {}, {}, {}); ``` UPDATE: If I change the pager this way ``` MyGrid.jqGrid('navGrid', '#GroupsPager', { edit: false, add: false, del: true, search: false }, {}, {}, {}); ``` I get this error: `uncaught exception: jqGrid - No such method: navGrid` This is the JSON returned: ``` {"total":1,"page":1,"records":3,"rows":[{"id":"1","cell":["Alberto"]},{"id":"2","cell":["Paolo"]},{"id":"3","cell":["Alessandro"]}]} ``` Since I am using ASP.NET MVC2 I include my js/css files this way: ``` <head runat="server"> <title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <link href="<%= Url.Content("~/Content/Site.css")%>" rel="stylesheet" type="text/css" /> <link href="<%=Url.Content("~/Content/themes/redmond/jquery-ui-1.8.13.custom.css")%>" rel="stylesheet" type="text/css" /> <script src="<%=Url.Content("~/Scripts/jquery-1.6.1.min.js")%>" type="text/javascript"></script> <script src="<%=Url.Content("~/Scripts/ui/jquery-ui-1.8.13.custom.min.js")%>" type="text/javascript"></script> <asp:ContentPlaceHolder ID="Head" runat="server"></asp:ContentPlaceHolder> </head> ``` As you can see I've used a new placeholder so I can include my page-scripts in the head: ``` <asp:Content ID="Content3" ContentPlaceHolderID="Head" runat="server"> <link href="<%=Url.Content("~/Content/jqGrid/ui.jqgrid.css")%>" rel="stylesheet" type="text/css" /> <script src="<%=Url.Content("~/Scripts/jqGrid/i18n/grid.locale-it.js")%>" type="text/javascript"></script> <script src="<%=Url.Content("~/Scripts/jqGrid/jquery.jqGrid.min.js")%>" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { var MyGrid = jQuery("#GroupsGrid"); MyGrid.jqGrid({ url: '/Home/FetchData', postData: { Query: 'aaa' }, datatype: 'json', mtype: 'POST', colNames: ['Nome'], colModel: [ { name: 'Name', index: 'Name', sortable: false, width: 730 } ], pager: '#GroupsPager', rowList: [15, 30, 50], rowNum: 15, width: 794, height: 350, rownumbers: true }); MyGrid.jqGrid('navGrid', '#GroupsPager', { edit: false, add: false, del: true, search: false }, {}, {}, {}); }); </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <div> <table id="GroupsGrid"></table> <div id="GroupsPager"></div> </div> </asp:Content> ```
jqGrid 4 with jQuery 1.6.1
CC BY-SA 3.0
null
2011-06-02T15:30:53.793
2011-06-03T10:47:39.827
2011-06-03T10:47:39.827
219,406
219,406
[ "jquery", "jqgrid" ]
6,216,754
1
6,217,032
null
2
344
A very strange behavior is occuring on the website I'm working on in a animal display list. The animals are laid out in a grid format. When in IE8 and with compat mode turned on, the animals pictures all shoot to the top of the screen and stack under each other. This is completely perplexing to me. I need to call upon the talent of this community to help me fix this bug. Example Page found here - [http://www.petango.com/Forms/AnimalSearchResults.aspx?z=L2R%205W3&d=2147483647&sh=0&s=1&b=650&g=All&size=All&c=All&a=All&dec=All&p=False&sid=0&zs=True&ht=False](http://www.petango.com/Forms/AnimalSearchResults.aspx?z=L2R%205W3&d=2147483647&sh=0&s=1&b=650&g=All&size=All&c=All&a=All&dec=All&p=False&sid=0&zs=True&ht=False) In IE8, it looks okay, when compat mode is turned on, the images shoot to the top of the page. I can only assume this behavior is found in IE7. I'm at a loss at where to start troubleshooting this. ![enter image description here](https://i.stack.imgur.com/HdKW4.jpg) I tried a test where I took the animal display code and removed the unordered list and replaced it with a table. ![enter image description here](https://i.stack.imgur.com/2Nruo.jpg) The Div within the LI element doesn't seem to be the culprit?
IE8/Compat View Bug - All images stack on each other at top of Div. Need Help
CC BY-SA 3.0
null
2011-06-02T15:35:31.593
2011-06-02T16:20:35.130
2011-06-02T16:20:35.130
751,163
751,163
[ "html", "css", "internet-explorer-8", "internet-explorer-7" ]
6,216,771
1
6,216,792
null
4
772
I have seen a lot of these diagrams in some help files and src documentation What are they called? Are there any other (for same purpose) known diagrams? ![enter image description here](https://i.stack.imgur.com/uDoc4.gif) Img source : [http://www.sqlite.org/images/syntax/insert-stmt.gif](http://www.sqlite.org/images/syntax/insert-stmt.gif)
What are these diagrams called? (answer : railroad diagrams)
CC BY-SA 3.0
0
2011-06-02T15:36:48.520
2011-06-22T19:47:09.523
2011-06-22T19:47:09.523
231,382
231,382
[ "diagram", "sequence-diagram", "diagramming" ]
6,216,800
1
null
null
3
121
I have an issue with iPhone 4 adding some yellow stripes to an element with a white to grey gradient. I have attached an image to show what it renders like on the iPhone. ![comparison](https://i.stack.imgur.com/jUyaq.jpg) It's not happening on previous versions of the iPhone or android phones. Does anyone have any idea's as to why this might be happening?
iPhone 4 adding yellow to stripes to an element
CC BY-SA 3.0
null
2011-06-02T15:38:59.003
2011-06-05T23:13:42.500
2011-06-02T16:02:05.617
373,700
373,700
[ "iphone", "html", "css", "safari" ]
6,216,986
1
6,217,033
null
1
1,855
I'm trying to format my grid view so it looks like the following: ![enter image description here](https://i.stack.imgur.com/LeLNg.png) so instead of looking like a table it has 2 columns and 3 rows. Thanks in advance
Html Formatting Grid View
CC BY-SA 3.0
null
2011-06-02T15:57:08.003
2011-06-02T17:50:34.480
null
null
512,623
[ "asp.net", "gridview" ]