[Solved] set up error message for drop down

[ad_1] Yes. You can acheive that with the combination of PHP and JQUERY Let’s say this is your first page <form action=”secondPage.php” method=”post”> <select id=”men” class=”select_class1″ name=”subselector”> <option value=””>Choose an Item</option> <option value=”tsm”>T-Shirt</option> <option value=”lsm”>Long Sleeve</option> <option value=”tankm”>Tank Top</option> </select> <input type=”submit” value=”submit” /> </form> Then this would be your secondPage.php <?php $subselector = $_POST[‘subselector’]; … Read more

[Solved] Need Java function that takes image and imagesize(in Kb) as input and return an image [closed]

[ad_1] Keep adjusting the compression in this example until the image size in bytes is below the limit. Screen shot Typical outputs Fractional Metrics: true Nonantialiased text mode PNG size: 7390 bytes JPG size: 7036 bytes quality: 35 Fractional Metrics: true Antialiased text mode PNG size: 8741 bytes JPG size: 8663 bytes quality: 55 Fractional … Read more

[Solved] How to get Android screen height minus status bar in pixel?

[ad_1] root = (ViewGroup)findViewById(R.id.root); root.post(new Runnable() { public void run(){ Rect rect = new Rect(); Window win = getWindow(); win.getDecorView().getWindowVisibleDisplayFrame(rect); int statusHeight = rect.top; int contentViewTop = win.findViewById(Window.ID_ANDROID_CONTENT).getTop(); int titleHeight = contentViewTop – statusHeight; Log.w(“dimens_tag”, “title = ” + titleHeight + ” status bar = ” + statusHeight); } }); 3 [ad_2] solved How to … Read more

[Solved] Breaking down sums into frequency (for histogram)

[ad_1] This should do the trick. If not, it will at least get you started. Sub Expand_Occurance() Dim ItemCounter As Long, shBottom As Long, NewItemRow As Long, OccuranceCounter As Long Dim sh As Worksheet Set sh = ActiveSheet shBottom = sh.Cells(Rows.Count, 1).End(xlUp).Row ‘get the bottom row of column 1 NewItemRow = shBottom + 1 ‘and … Read more

[Solved] Replace list item with corresponding dictionary value [closed]

[ad_1] Let’s define your variables: >>> d = {‘apple’: ‘2’, ‘banana’: ‘3’, ‘pear’: ‘1’, ‘peach’: ‘1’} >>> x = [‘banana’, ‘apple’, ‘pear’, ‘apple banana’] Now, let’s compute the results: >>> [sum(int(d[k]) for k in y.split()) for y in x] [3, 2, 1, 5] >>> sum(sum(int(d[k]) for k in y.split()) for y in x) 11 Or, … Read more

[Solved] How to write a program that calculate sum of all even numbers under any specific input integer number by using recursion class in java? [closed]

[ad_1] How to write a program that calculate sum of all even numbers under any specific input integer number by using recursion class in java? [closed] [ad_2] solved How to write a program that calculate sum of all even numbers under any specific input integer number by using recursion class in java? [closed]

[Solved] SQL – Distinct with Case When

[ad_1] select distinct OENT.OTHER_EXTERNAL_ID AS AGENT_NUMBER, CASE WHEN SE.Organization_Name IS NULL OR RTRIM(LTRIM(SE.ORGANIZATION_NAME)) = ” THEN ” ELSE upper( SE.ORGANIZATION_NAME ) END AS AGENT FROM SomeTableName order by AGENT_NUMBER It will still return duplicates in case if Agent number differs. If you want to find duplicated names then select AGENT, count (AGENT_NUMBER) from ( select … Read more

[Solved] permutation and combinations football score

[ad_1] Simple answer to use recursion, If you don’t know recursion read that first void print_goals(int m,int n,int i,int j,string s) { if(i == m && j == n) { cout<<s+char(48+i)+’-‘+char(48+j)<<endl; return; } if(i<=m) print_goals(m,n,i+1,j,s+char(48+i)+’-‘+char(48+j)+’,’); if(j<=n) print_goals(m,n,i,j+1,s+char(48+i)+’-‘+char(48+j)+’,’); } call it as print_goals(5,2,0,0,””); where m=5 and n=2 0 [ad_2] solved permutation and combinations football score

[Solved] Procedure in SQL Server query

[ad_1] You better specify all columns after your table #tempbe_budget like following: INSERT INTO #tempbe_budget( budgetno, Finyear, Deptid, ….. ) Add collation adjustment to your JOINS: FROM budget bud LEFT OUTER JOIN womaster wo ON wo.bcno1516 COLLATE SQL_Latin1_General_CP1_CI_AS = bud.newno COLLATE SQL_Latin1_General_CP1_CI_AS LEFT OUTER JOIN department dept ON dept.deptid COLLATE SQL_Latin1_General_CP1_CI_AS = bud.deptid COLLATE SQL_Latin1_General_CP1_CI_AS … Read more

[Solved] How we get user facebook album pictures, This api is not working [closed]

[ad_1] Try this: FB.api(“/839506469483059/photos”, … Put a console.log(response) in the callback to see any error or data. You will get an array of pictures, so “response.picture” is definitely wrong. The ID does not seem to be public, i assume it´s the album of a user profile. In that case, you need to authorize that user … Read more

[Solved] Center align image in a div [duplicate]

[ad_1] I’m not sure about why your current code have default text-align: left for div element. But please try this one: http://jsfiddle.net/18230pwa/ div img { display : block; margin : auto; } div { text-align: left; } 0 [ad_2] solved Center align image in a div [duplicate]

[Solved] Java 2D string or arraylist?

[ad_1] Option 1: List<String[]> dataSet = new ArrayList<String[]>(); dataSet.add(new String[] { “abc”, “def”, “ghi” }); dataSet.add(new String[] { “xyz” }); dataSet.add(new String[] { “lmn”, “opq”, “rst”, “uvw” }); Option 2: If you know the number of rows in advance, you can also do this: int numRows = 3; //if you know the number of rows … Read more