qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
3,925,503
Hi I am looking to set the timezone for San Antonio, Texas.Can some please tell me how do i set the same in my Java code. I want it in the format somewhat similar to America/New York Currently I am using this code ``` TimeZone.getTimeZone("America/Denver"); ``` But "America/Denver" doesn't seem to be the right ti...
2010/10/13
[ "https://Stackoverflow.com/questions/3925503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/241755/" ]
San Antonio → `America/Chicago` =============================== The IANA time zone identifier for San Antonio is `America/Chicago`, as [shown on Time.is](http://time.is/San_Antonio). Using java.time =============== The modern way to handle date-time is with the java.time classes. The [`Instant`](http://docs.oracle....
related topic: [How to handle calendar TimeZones using Java?](https://stackoverflow.com/questions/230126/how-to-handle-calendar-timezones-using-java) timezone for San Antonio: Standard time zone: UTC/GMT -6 hours Daylight saving time: +1 hour Current time zone offset: UTC/GMT -5 hours Time zone abbreviat...
3,925,503
Hi I am looking to set the timezone for San Antonio, Texas.Can some please tell me how do i set the same in my Java code. I want it in the format somewhat similar to America/New York Currently I am using this code ``` TimeZone.getTimeZone("America/Denver"); ``` But "America/Denver" doesn't seem to be the right ti...
2010/10/13
[ "https://Stackoverflow.com/questions/3925503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/241755/" ]
For San Antonio, you should use `TimeZone.getTimeZone("US/Central")` If you really need to use `"America/<City>"` format, the closest to San Antonio us city is `"America/Chicago"`. You can use this to get a list of all available specific IDs for US/Central: ``` String[] values = TimeZone.getAvailableIDs(TimeZone.get...
San Antonio → `America/Chicago` =============================== The IANA time zone identifier for San Antonio is `America/Chicago`, as [shown on Time.is](http://time.is/San_Antonio). Using java.time =============== The modern way to handle date-time is with the java.time classes. The [`Instant`](http://docs.oracle....
57,025,231
I have created a form **from.blade.php** for both create **create.balde.php** and edit **edit.blade.php**. I'm using that form to perform the two action but I'm facing a problem with retrieving data and displaying it for radio buttons .. knowing that when I go to create action the radio buttons will be as default. ...
2019/07/14
[ "https://Stackoverflow.com/questions/57025231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11506834/" ]
GitLab is a Git-repository manager (just like GitHub), so importing a GitLab project is the same as importing a Git project. Once you have chosen the `Project from Version Control` option, click `Git` and provide a repository url (which is obtainable on project's page via `Clone` button). If you have any doubts, ch...
You can use the GitLab Projects plugin or just use the command line.
57,025,231
I have created a form **from.blade.php** for both create **create.balde.php** and edit **edit.blade.php**. I'm using that form to perform the two action but I'm facing a problem with retrieving data and displaying it for radio buttons .. knowing that when I go to create action the radio buttons will be as default. ...
2019/07/14
[ "https://Stackoverflow.com/questions/57025231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11506834/" ]
GitLab is a Git-repository manager (just like GitHub), so importing a GitLab project is the same as importing a Git project. Once you have chosen the `Project from Version Control` option, click `Git` and provide a repository url (which is obtainable on project's page via `Clone` button). If you have any doubts, ch...
Just few clicks... File --> New --> Project from Version Control… [![enter image description here](https://i.stack.imgur.com/QGx76.png)](https://i.stack.imgur.com/QGx76.png) and insert the Clone URI of your remote repo, e.g. <https://gitlab.com/user101/myproject1.git> [![enter image description here](https://i.stack.i...
35,430,832
I would like to define the spring scheduler (or quartz cron scheduler) at specific times. For example, I have been given particular times at which a certain job should be run. Those times are 09:00, 12:15, 15:35, 19:05 So as you can see these times are random. So I cannot schedule them in cron Is there another way t...
2016/02/16
[ "https://Stackoverflow.com/questions/35430832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1771680/" ]
You should look at the Date/Time instead of in-app timers for this purpose. Essentially, you need to track the time passed between launches of the app. You can do this via storing the Date in the user defaults when the app is closed, and comparing it to the current Date when the app is openened the next time to figure...
You may want to look at using an external clock, like grabbing the time from a website, this will prevent people from simply changing there clocks to alter time. (This will not however prevent people from altering the DNS to go to there own web servers, but will most people go through that trouble for a simple game)
1,857,762
Consider $47^{27}$ congruent to $R \pmod {55}$. Since $ 55 = 11\times5$ which are coprime, we can say: $R$ is congruent to $14^{27} \pmod 5 $ and$\pmod {11}$ However $14$ is $-1 \pmod 5$ so $14^{27}$ is congruent to $-1 \pmod 5$. I checked on wolfram and the solution is $53$, which is not $-1 \pmod 5$. What gives?
2016/07/13
[ "https://math.stackexchange.com/questions/1857762", "https://math.stackexchange.com", "https://math.stackexchange.com/users/352323/" ]
\begin{align} 47^{27} &\cong 2^{27} \pmod{5} \\ &\cong 2 \cdot 2^{26} \pmod{5} \\ &\cong 2 \cdot (-1)^{13} \pmod{5} \\ &\cong 3 \pmod{5} \text{.} \\ 53 &\cong 3 \pmod{5} \text{.} \\ 47^{27} &\cong 3^{27} \pmod{11} \\ &\cong 3 \cdot 3^{26} \pmod{11} \\ &\cong 3 \cdot 9^{13} \pmod{11} \\ &\cong 5 \cdot 4^{6}...
As $47\equiv-8\pmod{55}$ $47^{27}\equiv(-2^3)^{27}\pmod{55}$ $(-2^3)^{27}=-2^{81}$ Now using [Carmichael Function](http://mathworld.wolfram.com/CarmichaelFunction.html), $\lambda(55)=\cdots=20$ As $81\equiv1\pmod{20},$ $$2^{81}\equiv2^1\pmod{55}$$
1,487
How can I check Google Page Rank of all pages of a website without installing any tool on my machine?
2010/07/22
[ "https://webmasters.stackexchange.com/questions/1487", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/967/" ]
I honestly wouldn't bother doing it all. The publicly available [toolbar PageRank is only one of 200+ factors](http://sphinn.com/story/74952#c54521) Google uses and it doesn't necessarily reflect where your page will appear on the search results pages. It's not updated very frequently either (every few months), while t...
In regards to is pr still a important i think that although it may not be as important as part of the ranking algorithm i think that as a webmaster its still a really good starting point when looking at a pages authoirity as some of the signals that will give a page good PR will also be the same signals that search eng...
48,295,470
As i need to extract only particular pattern from string: ``` import re string='/x/eng/wcov/Job148666--rollup_generic/Job148674--ncov_aggregate/Job148678--run_command/Job148678.info: devN_180107_2035' line2=re.findall(r'(?:/\w*)' ,string) print(line2) ``` I'm getting output as below: ``` ['/x', '/eng', '/wcov', ...
2018/01/17
[ "https://Stackoverflow.com/questions/48295470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8433522/" ]
Try using `split()` function ``` string='/x/eng/wcov/Job148666--rollup_generic/Job148674--ncov_aggregate/Job148678--run_command/Job148678.info: devN_180107_2035' sp=string.split(':')[0] ```
Does the string always end with `:`? Then use this ``` str.split(":", 1)[0] ```
768,223
Let's say I have a class Person, with a string[] nickNames, where Person can have 0 or more nicknames stored. I want to create an asp.net page where a user can go and add/edit/delete nicknames. Question is- how to i persist the Person object between postbacks? I query the DB and create the object then display it on ...
2009/04/20
[ "https://Stackoverflow.com/questions/768223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Well if your Person Object is serializable you could store it in ViewState and if not, you could stick it in Session, but it sounds like you might have a general lack of understanding about Data Persistance in general Depending on your implementation, and whether you're coding this all by hand or using the built in Da...
Query the object it again (you could store it in a session variable but that doesn't scale), gather and apply changes from user upon postback.
30,752,002
I have array: ``` Array ( [5] => Array ( [0] => 19 [1] => 18 ) [6] => Array ( [0] => 28 ) ) ``` And I'm trying to delete element by value using my function: ``` function removeElementWithValue($obj, $delete_value){ if (!empty($obj->f...
2015/06/10
[ "https://Stackoverflow.com/questions/30752002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/889349/" ]
Use array\_walk\_recursive to find and change value ``` $arr = Array ( 5 => Array ( 0 => 19, 1 => 18 ), 6 => Array ( 0 => 28)); $value = 18; array_walk_recursive($arr, function (&$item, $key, $v) { if ($item == $v) $item = ''; }, $value); print_r($arr); ``` result: ``` Array ( 5 => Array ( 0 ...
A simpler function might be.. ``` function removeElementWithValue($ar,$val){ foreach($ar as $k=>$array){ //update the original value with a new array $new_ar = array_diff_key($array,array_flip(array_keys($array,$val))); if($new_ar){ $ar[$k]=$new_ar; }else{ u...
12,043,932
I have everything working on my ios development device, but I do not understand how to send the ipa file to beta testers before submitting it to the app store. I tried installing the ipa file from a website, but the install stops and says the app cannot be installed. I looked at the instructions in the provisioning pa...
2012/08/20
[ "https://Stackoverflow.com/questions/12043932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/933236/" ]
You may need to create a distribution profile with the UUID of all the beta testing devices. Here is a link for instructions to send adhoc build: <http://www.raywenderlich.com/1669/how-to-host-a-beta-test-for-your-ios-app> and look for "How Do I Send the Beta Testers an Ad-Hoc Build?" You donot need to generate `ipa` ...
I know a number of folks who have used Test Flight successfully. <https://testflightapp.com/>
62,350,906
I'm looking for a way to calculate haversine distance between two geographical points (lat and lon) in Athena! In presto, we have something like great\_circle\_distance but Athena doesn't have it. Any suggestion?
2020/06/12
[ "https://Stackoverflow.com/questions/62350906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2145138/" ]
This is c# but the algo is there, just port logic to an athena query, from my reading a ton of people end up implementing haversine themselves in athena ```cs static double haversine(double lat1, double lon1, double lat2, double lon2) { // distance between latitudes and longitudes d...
Athena has a large number of [geospatial functions](https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list.html), including one called `ST_DISTANCE` that returns the distance between two points in degrees, I'm no GIS expert, but I assume it should be possible to convert that to a distance in kilometers.
62,350,906
I'm looking for a way to calculate haversine distance between two geographical points (lat and lon) in Athena! In presto, we have something like great\_circle\_distance but Athena doesn't have it. Any suggestion?
2020/06/12
[ "https://Stackoverflow.com/questions/62350906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2145138/" ]
This is now available in Athena engine version 2: <https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list-v2.html> [![enter image description here](https://i.stack.imgur.com/khMRF.png)](https://i.stack.imgur.com/khMRF.png)
This is c# but the algo is there, just port logic to an athena query, from my reading a ton of people end up implementing haversine themselves in athena ```cs static double haversine(double lat1, double lon1, double lat2, double lon2) { // distance between latitudes and longitudes d...
62,350,906
I'm looking for a way to calculate haversine distance between two geographical points (lat and lon) in Athena! In presto, we have something like great\_circle\_distance but Athena doesn't have it. Any suggestion?
2020/06/12
[ "https://Stackoverflow.com/questions/62350906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2145138/" ]
This is now available in Athena engine version 2: <https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list-v2.html> [![enter image description here](https://i.stack.imgur.com/khMRF.png)](https://i.stack.imgur.com/khMRF.png)
Athena has a large number of [geospatial functions](https://docs.aws.amazon.com/athena/latest/ug/geospatial-functions-list.html), including one called `ST_DISTANCE` that returns the distance between two points in degrees, I'm no GIS expert, but I assume it should be possible to convert that to a distance in kilometers.
44,639,346
I've recently been working on a sudoku game in c++. I've made a graphic version of it using SFML and it works just fine. However, I need to implement an algorithm which will solve the sudoku, whilst **not** being a brute-force algorithm (so backtracking doesn't work for me ;/). I've read about many ways to solve it and...
2017/06/19
[ "https://Stackoverflow.com/questions/44639346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7770775/" ]
As long as the script isn't run on the first of March in a leap year, all files in FolderData with the last digits corresponding to "yesterday" will be * Copied to FolderTemp while being stripped from the last 9 digits of the file name * Moved to Folder3 while being stripped from the last 9 digits of the file name My...
With the following powershell script folder2 isn't necessary, you didn't name folder3 - so adjust to your environment. ``` $Folder1 = "C:\Test\2017\06\20" $Folder3 = "C:\Test\2017\06\20\Destination" $YesterDay = (Get-Date).AddDays(-1).ToString('yyyyMMdd') Get-ChildItem -Path $Folder1 -Filter "SYS_PURCHASES_$YesterDa...
44,639,346
I've recently been working on a sudoku game in c++. I've made a graphic version of it using SFML and it works just fine. However, I need to implement an algorithm which will solve the sudoku, whilst **not** being a brute-force algorithm (so backtracking doesn't work for me ;/). I've read about many ways to solve it and...
2017/06/19
[ "https://Stackoverflow.com/questions/44639346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7770775/" ]
As long as the script isn't run on the first of March in a leap year, all files in FolderData with the last digits corresponding to "yesterday" will be * Copied to FolderTemp while being stripped from the last 9 digits of the file name * Moved to Folder3 while being stripped from the last 9 digits of the file name My...
A combined Batch/PowerShell approach. Powershell for the date calculation and pure batch for the rest ``` @Echo Off&Setlocal EnableDelayedExpansion Set "Folder1=C:\Test\2017\06\20" Set "Folder3=C:\Test\2017\06\20\Destination" For /f "usebackq delims=" %%A in ( `Powershell -NonI -Nop -Com "(Get-Date).AddDays(-1).To...
44,639,346
I've recently been working on a sudoku game in c++. I've made a graphic version of it using SFML and it works just fine. However, I need to implement an algorithm which will solve the sudoku, whilst **not** being a brute-force algorithm (so backtracking doesn't work for me ;/). I've read about many ways to solve it and...
2017/06/19
[ "https://Stackoverflow.com/questions/44639346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7770775/" ]
With the following powershell script folder2 isn't necessary, you didn't name folder3 - so adjust to your environment. ``` $Folder1 = "C:\Test\2017\06\20" $Folder3 = "C:\Test\2017\06\20\Destination" $YesterDay = (Get-Date).AddDays(-1).ToString('yyyyMMdd') Get-ChildItem -Path $Folder1 -Filter "SYS_PURCHASES_$YesterDa...
A combined Batch/PowerShell approach. Powershell for the date calculation and pure batch for the rest ``` @Echo Off&Setlocal EnableDelayedExpansion Set "Folder1=C:\Test\2017\06\20" Set "Folder3=C:\Test\2017\06\20\Destination" For /f "usebackq delims=" %%A in ( `Powershell -NonI -Nop -Com "(Get-Date).AddDays(-1).To...
184,170
Let's say Alice wants to communicate with some server S. Eve manages that the traffic from both parties will pass her in order to impersonate server S. Now, digital certificates are supposed to provide authentication. In this scenario it should ensure the identity of the server, so that Eve is not able to impersonate S...
2018/04/20
[ "https://security.stackexchange.com/questions/184170", "https://security.stackexchange.com", "https://security.stackexchange.com/users/176240/" ]
You seem to understand that Alice checks that the certificate was issued for the server and that it was signed by an issuer (certificate authority) which is trusted by Alice. But what you are missing is that Alice also asks the server for a proof that the server actually owns the certificate - a proof which only the ...
E don't know secret part of S key. In asymmetric (or public key) cryptography you need to have PARE of key - public and private. But in real this is two pats of ONE key, and private key E can't be used with public key S See <https://en.wikipedia.org/wiki/Public-key_cryptography>
25,259,268
I defined a class in my ASP.NET webform page: ``` namespace AdsignInt_V0._2.AdvertiserZone.ChartReports { public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { List<string> XAxisItems = new List<string>(); XAxisItems...
2014/08/12
[ "https://Stackoverflow.com/questions/25259268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3327708/" ]
Try cleaning the solution and the temporary ASP files, then rebuild. Most likely, the last build has assemblies that point to the same class name. Also, the SeriesItem class is the old class that used to define RadHtmlChart series items, so you may want to change its name to avoid any conflicts. The current classes fo...
I define de System.Drawing in top. ``` using Draw = System.Drawing; ``` After if I need use System.Drawing I use it with Draw. Sample: ``` public SeriesItem(string Name, Draw.Color color) { name = Name; backgroundColor = color; dataFormatString = "{0}%"; position = LineAndScatterLabelsPosition.Abo...
52,108,872
I am using modal-popup.js, and when this anchor is clicked, the modal pop-up is displayed; however this removes focus from the anchor. Is there any way to force the browser to keep focus on anchor? ``` <a href="#">anchor</a> ```
2018/08/31
[ "https://Stackoverflow.com/questions/52108872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8134505/" ]
**Using StoryBoard** In `UITableView` You can drag `UIView`, it will set as FooterView if you have more then 0 prototype cell. After Drag you can see it in tableview hierarchy as subview. Now, you can add `UILabel` `UIButton` or any component on that View, adjust the height, etc. You can also set `IBAction` into ViewC...
Explanation why your have empty spacing: it is caused by your `heightForFooterInSection` method that leaves 100 pixels for footerView. Unfortunately you haven't register the Nib of the FooterView for your tableView and it does not know what to retrieve in this place. How to solve your issue: In your `ViewController` y...
52,108,872
I am using modal-popup.js, and when this anchor is clicked, the modal pop-up is displayed; however this removes focus from the anchor. Is there any way to force the browser to keep focus on anchor? ``` <a href="#">anchor</a> ```
2018/08/31
[ "https://Stackoverflow.com/questions/52108872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8134505/" ]
**Using StoryBoard** In `UITableView` You can drag `UIView`, it will set as FooterView if you have more then 0 prototype cell. After Drag you can see it in tableview hierarchy as subview. Now, you can add `UILabel` `UIButton` or any component on that View, adjust the height, etc. You can also set `IBAction` into ViewC...
``` func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { let myFooter = Bundle.main.loadNibNamed("ReportFooterCell", owner: self, options: nil)?.first as! ReportFooterCell myFooter.toWorkHours?.text = toWorkHour.toString() myFooter.workedHours?.text = workedHour.to...
52,108,872
I am using modal-popup.js, and when this anchor is clicked, the modal pop-up is displayed; however this removes focus from the anchor. Is there any way to force the browser to keep focus on anchor? ``` <a href="#">anchor</a> ```
2018/08/31
[ "https://Stackoverflow.com/questions/52108872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8134505/" ]
Explanation why your have empty spacing: it is caused by your `heightForFooterInSection` method that leaves 100 pixels for footerView. Unfortunately you haven't register the Nib of the FooterView for your tableView and it does not know what to retrieve in this place. How to solve your issue: In your `ViewController` y...
``` func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { let myFooter = Bundle.main.loadNibNamed("ReportFooterCell", owner: self, options: nil)?.first as! ReportFooterCell myFooter.toWorkHours?.text = toWorkHour.toString() myFooter.workedHours?.text = workedHour.to...
29,988,417
I am trying to migrate from SVN to git on windows by downloading the `svn2git.sh` script file and using the following command. ``` sh svn2git.sh [ProjectName] [SVN Repo link] [SVN Rev (Probably 0)] [Stash Repo Link] ``` I am new to this and very confused between git-svn and svn2git usage. Can anyone suggest me the s...
2015/05/01
[ "https://Stackoverflow.com/questions/29988417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4825504/" ]
I created a script for svn to git migration. This script migrates the svn repo to git along with all it's tags and history maintained. **Pre-requisites :** Make sure GIT and SVN are installed on your machine before moving ahead with the migration. **Description for Variables used** SVN\_REPO\_LINK : http link to w...
I had to migrate from SVN to git, and I found a really useful tutorial in atlassian. It shows you step by step how to migrate to git, in fact there is a svn-migration-scripts.jar that helps you with the process and this preserve your tags and branches, this is the link: <https://www.atlassian.com/git/tutorials/migratin...
62,572,448
I'm developing an app for my company, using firebase where I store some important business data. My question is, can I publish the app on the App Store for free and create a login page where only the employees with specific account create from me can enter? will apple accept an app like this? otherwise how can I publ...
2020/06/25
[ "https://Stackoverflow.com/questions/62572448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9962676/" ]
An app with a limited audience like this won't be accepted for the App Store. Your company will need to set up an Apple Business Manager account (which is free). You can then make the app available only to their Apple Business Manager ID in App Store connect. The app will still go through review but it won't be visib...
unfortunately there is no other way than to subscribe to the Enterprise Program, since it's easier to distribute the App to all the Devices via a URL/Profile. Otherwise you have to manually take all the Devices and export the App via Xcode on the Device (launching the App). Afaik there is minimum requirement of employe...
62,572,448
I'm developing an app for my company, using firebase where I store some important business data. My question is, can I publish the app on the App Store for free and create a login page where only the employees with specific account create from me can enter? will apple accept an app like this? otherwise how can I publ...
2020/06/25
[ "https://Stackoverflow.com/questions/62572448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9962676/" ]
There is now (since a while back) another alternative to this problem: Unlisted app distribution <https://developer.apple.com/support/unlisted-app-distribution/> It makes it possible to publish your app on the App Store, but the only way to find the app is by a direct link. And an important difference of this to App...
unfortunately there is no other way than to subscribe to the Enterprise Program, since it's easier to distribute the App to all the Devices via a URL/Profile. Otherwise you have to manually take all the Devices and export the App via Xcode on the Device (launching the App). Afaik there is minimum requirement of employe...
62,572,448
I'm developing an app for my company, using firebase where I store some important business data. My question is, can I publish the app on the App Store for free and create a login page where only the employees with specific account create from me can enter? will apple accept an app like this? otherwise how can I publ...
2020/06/25
[ "https://Stackoverflow.com/questions/62572448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9962676/" ]
An app with a limited audience like this won't be accepted for the App Store. Your company will need to set up an Apple Business Manager account (which is free). You can then make the app available only to their Apple Business Manager ID in App Store connect. The app will still go through review but it won't be visib...
There is now (since a while back) another alternative to this problem: Unlisted app distribution <https://developer.apple.com/support/unlisted-app-distribution/> It makes it possible to publish your app on the App Store, but the only way to find the app is by a direct link. And an important difference of this to App...
162,947
Many searches and tutorials all showed that if you drop an `.iso` file in `Disc Utility` and go to `Burn` it will make a bootable disc but when I do it in Yosemite it will burn a copy of the `.iso` file. How do I make a bootable disc in Yosemite?
2014/12/21
[ "https://apple.stackexchange.com/questions/162947", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/67990/" ]
* Locate the `.iso` file you want to burn and place it on your Desktop: ![enter image description here](https://i.stack.imgur.com/wGOyZ.png) * Navigate to to `Disc Utility` (`Applications -> Utilities -> Disc Utility`) ![enter image description here](https://i.stack.imgur.com/uXmXB.png) * Once `Disc Utility` is ope...
If you've [Burn](http://burn-osx.sourceforge.net/) app installed, the easiest way is to right click on the `.iso` file and select '*Burn Disk Image XXX to Disc...*". This will run the app with appropriate settings. When ready, hit the *Burn* button. Should work in *El Capitan* and *Sierra* macOS as well.
50,283
Why is there block gas limit? Should it just be the sum of gas limit used by each transactions inside the block? Why do we need an extra field for it instead of calculate it?
2018/06/03
[ "https://ethereum.stackexchange.com/questions/50283", "https://ethereum.stackexchange.com", "https://ethereum.stackexchange.com/users/7816/" ]
The gas limit of a block defines the maximum amount of gas that all the transactions inside the block are allowed to consume. Its purpose is to keep propagation and transaction time of the block at a minimum, thereby making the network decentralized. The gas limit of a block is not fixed, it can be adjusted by the mine...
On Ethereum, the number of pending transactions that can fit into the upcoming block depends on how many units of gas each transaction in the block might spend. When miners create new blocks, the total sum of the transaction gas limits in the block must be less than the block’s gas limit. Since the London hard fork, e...
1,664,161
I have a PDF generated by 3rd party system. Using PDF editor or els software I have modified it. Is it possible to detect if PDF file was modified, without original file? I will add some more details. There is no encryption and no signature features. Document is created by IT system. User receives document and m...
2009/11/02
[ "https://Stackoverflow.com/questions/1664161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285306/" ]
The problem with this is that just opening the PDF on a Mac in Preview and hitting Command-S to save the file will replace both the Creation and Modification date to match the current date/time. So even the creation date will be wrong. Even novice users can unknowingly do this, so if you're trying to track someone who ...
You could always check the `md5sum` of the pdf file. I'm not sure what environment you are using but that should help get you started.
1,664,161
I have a PDF generated by 3rd party system. Using PDF editor or els software I have modified it. Is it possible to detect if PDF file was modified, without original file? I will add some more details. There is no encryption and no signature features. Document is created by IT system. User receives document and m...
2009/11/02
[ "https://Stackoverflow.com/questions/1664161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285306/" ]
The problem with this is that just opening the PDF on a Mac in Preview and hitting Command-S to save the file will replace both the Creation and Modification date to match the current date/time. So even the creation date will be wrong. Even novice users can unknowingly do this, so if you're trying to track someone who ...
It's going to be rough without the original file unless there were security features like encryption or digital signatures applied to it, which it doesn't sound like there was. Do you have access to any information at all about the original file? A file size, creation date, any of the metadata, etc.?
1,664,161
I have a PDF generated by 3rd party system. Using PDF editor or els software I have modified it. Is it possible to detect if PDF file was modified, without original file? I will add some more details. There is no encryption and no signature features. Document is created by IT system. User receives document and m...
2009/11/02
[ "https://Stackoverflow.com/questions/1664161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285306/" ]
The problem with this is that just opening the PDF on a Mac in Preview and hitting Command-S to save the file will replace both the Creation and Modification date to match the current date/time. So even the creation date will be wrong. Even novice users can unknowingly do this, so if you're trying to track someone who ...
If the tool used to modify the PDF is working according to the PDF spec then in the Info dictionary it should update ModDate but leave CreationDate alone. You may also see some non-zero generation numbers on the objects although it is just as possible that all the objects have been regenerated and will therefore be gen...
1,664,161
I have a PDF generated by 3rd party system. Using PDF editor or els software I have modified it. Is it possible to detect if PDF file was modified, without original file? I will add some more details. There is no encryption and no signature features. Document is created by IT system. User receives document and m...
2009/11/02
[ "https://Stackoverflow.com/questions/1664161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285306/" ]
The problem with this is that just opening the PDF on a Mac in Preview and hitting Command-S to save the file will replace both the Creation and Modification date to match the current date/time. So even the creation date will be wrong. Even novice users can unknowingly do this, so if you're trying to track someone who ...
Are the users modifying the PDF using Acrobat? If so then what Danio mentioned above should work. Strictly speaking, modifying the PDF should change its ModDate or xmp:ModifyDate without changing its CreationDate. However not all tools adhere to this; quite a few simply leave all metadata untouched, so this method of c...
1,664,161
I have a PDF generated by 3rd party system. Using PDF editor or els software I have modified it. Is it possible to detect if PDF file was modified, without original file? I will add some more details. There is no encryption and no signature features. Document is created by IT system. User receives document and m...
2009/11/02
[ "https://Stackoverflow.com/questions/1664161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285306/" ]
The problem with this is that just opening the PDF on a Mac in Preview and hitting Command-S to save the file will replace both the Creation and Modification date to match the current date/time. So even the creation date will be wrong. Even novice users can unknowingly do this, so if you're trying to track someone who ...
If you're using [Ubuntu linux 18.04](http://releases.ubuntu.com/18.04/) and using [Document Viewer](https://i.stack.imgur.com/2hTcG.png) then, you can * click on **File options** (3 vertical line ellipsis) * click on **Properties...** * look for **Created** / **Modified** fields in the Properties pop up Beware: A suf...
1,664,161
I have a PDF generated by 3rd party system. Using PDF editor or els software I have modified it. Is it possible to detect if PDF file was modified, without original file? I will add some more details. There is no encryption and no signature features. Document is created by IT system. User receives document and m...
2009/11/02
[ "https://Stackoverflow.com/questions/1664161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285306/" ]
The problem with this is that just opening the PDF on a Mac in Preview and hitting Command-S to save the file will replace both the Creation and Modification date to match the current date/time. So even the creation date will be wrong. Even novice users can unknowingly do this, so if you're trying to track someone who ...
You can use some tools to get the pdf file property. I use pdfinfo, you can get many property of the file, and check it. ``` pdfinfo 58dcc41d01293.pdf Author: worker Creator: Microsoft® Word 2016 Producer: Microsoft® Word 2016 CreationDate: Sat Aug 24 16:02:29 2019 ModDate: ...
64,658,060
I want to find all "n't" in a sentence with this Regex `'n't [0-9]+(\.[0-9][0-9]?)?'`. And its working fine in [RegExr](https://regexr.com): [![enter image description here](https://i.stack.imgur.com/pwAms.png)](https://i.stack.imgur.com/pwAms.png) but When I try to do it with this code, it does not work: ``` txt = ...
2020/11/03
[ "https://Stackoverflow.com/questions/64658060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14391665/" ]
> > **What enzyme adapter is there for React 17?** > > > If you have **React version 17**, you can use this [unofficial adapter for React 17 for enzyme](https://www.npmjs.com/package/@wojtekmaj/enzyme-adapter-react-17). ```js // src/setupTests.js import { configure } from 'enzyme'; import Adapter from '@wojtekmaj...
I tried with unofficial adapter '@wojtekmaj/enzyme-adapter-react-17' and it works fine. **Thanks @super Jade.** 1. clear the npm cache (clearing this may make npm slower, but give it a try). * `npm cache verify` and then `npm cache clean --force` 2. remove your * `node_modules` and `package-lock.json` 3. update np...
64,658,060
I want to find all "n't" in a sentence with this Regex `'n't [0-9]+(\.[0-9][0-9]?)?'`. And its working fine in [RegExr](https://regexr.com): [![enter image description here](https://i.stack.imgur.com/pwAms.png)](https://i.stack.imgur.com/pwAms.png) but When I try to do it with this code, it does not work: ``` txt = ...
2020/11/03
[ "https://Stackoverflow.com/questions/64658060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14391665/" ]
> > **What enzyme adapter is there for React 17?** > > > If you have **React version 17**, you can use this [unofficial adapter for React 17 for enzyme](https://www.npmjs.com/package/@wojtekmaj/enzyme-adapter-react-17). ```js // src/setupTests.js import { configure } from 'enzyme'; import Adapter from '@wojtekmaj...
add this code in setupTests.js file ``` // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; import Enzyme from 'enzyme'; import Ad...
64,658,060
I want to find all "n't" in a sentence with this Regex `'n't [0-9]+(\.[0-9][0-9]?)?'`. And its working fine in [RegExr](https://regexr.com): [![enter image description here](https://i.stack.imgur.com/pwAms.png)](https://i.stack.imgur.com/pwAms.png) but When I try to do it with this code, it does not work: ``` txt = ...
2020/11/03
[ "https://Stackoverflow.com/questions/64658060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14391665/" ]
> > **What enzyme adapter is there for React 17?** > > > If you have **React version 17**, you can use this [unofficial adapter for React 17 for enzyme](https://www.npmjs.com/package/@wojtekmaj/enzyme-adapter-react-17). ```js // src/setupTests.js import { configure } from 'enzyme'; import Adapter from '@wojtekmaj...
I've tried [@wojtekmaj/enzyme-adapter-react-17](https://www.npmjs.com/package/@wojtekmaj/enzyme-adapter-react-17) for React 17, and it does work just fine. After using `npm install --save-dev @wojtekmaj/enzyme-adapter-react-17` you also need to set up enzyme to use the adapter you want it to use, you do so by adding t...
64,658,060
I want to find all "n't" in a sentence with this Regex `'n't [0-9]+(\.[0-9][0-9]?)?'`. And its working fine in [RegExr](https://regexr.com): [![enter image description here](https://i.stack.imgur.com/pwAms.png)](https://i.stack.imgur.com/pwAms.png) but When I try to do it with this code, it does not work: ``` txt = ...
2020/11/03
[ "https://Stackoverflow.com/questions/64658060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14391665/" ]
I tried with unofficial adapter '@wojtekmaj/enzyme-adapter-react-17' and it works fine. **Thanks @super Jade.** 1. clear the npm cache (clearing this may make npm slower, but give it a try). * `npm cache verify` and then `npm cache clean --force` 2. remove your * `node_modules` and `package-lock.json` 3. update np...
add this code in setupTests.js file ``` // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; import Enzyme from 'enzyme'; import Ad...
64,658,060
I want to find all "n't" in a sentence with this Regex `'n't [0-9]+(\.[0-9][0-9]?)?'`. And its working fine in [RegExr](https://regexr.com): [![enter image description here](https://i.stack.imgur.com/pwAms.png)](https://i.stack.imgur.com/pwAms.png) but When I try to do it with this code, it does not work: ``` txt = ...
2020/11/03
[ "https://Stackoverflow.com/questions/64658060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14391665/" ]
I tried with unofficial adapter '@wojtekmaj/enzyme-adapter-react-17' and it works fine. **Thanks @super Jade.** 1. clear the npm cache (clearing this may make npm slower, but give it a try). * `npm cache verify` and then `npm cache clean --force` 2. remove your * `node_modules` and `package-lock.json` 3. update np...
I've tried [@wojtekmaj/enzyme-adapter-react-17](https://www.npmjs.com/package/@wojtekmaj/enzyme-adapter-react-17) for React 17, and it does work just fine. After using `npm install --save-dev @wojtekmaj/enzyme-adapter-react-17` you also need to set up enzyme to use the adapter you want it to use, you do so by adding t...
68,274,976
I am using React and Material UI to create a table (XGrid) with some buttons. When you click the row, it should set the row id using `useState`. When you click the delete button, it should delete the row. It seems that the delete click handler is not using the value from use state. This is either some kind of closure t...
2021/07/06
[ "https://Stackoverflow.com/questions/68274976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15961938/" ]
Lets first start that this query going for EVERY user (with the few exceptions you want to EXCLUDE -- I did not include that exclusion list in my query ), I would ask why are you trying to show sales and commission counts for all users to see how all users are doing. I would think that if I was a rep for your company, ...
First of all, you select about all rows instead of only the months you are interested in. * Solution: A `WHERE` clause to restrict the rows taken into consideration. Then you cross join a user's customers with the user's commissions, thus building a huge intermediate result you don't need and want. * Solution: Aggre...
23,630,928
I am creating a new application using Angular JS where ng grid used at many pages. I want to enable some global configuration for all the grid so that I can change the look and feel from a common place for all grids like, allow sorting, re-size of columns etc. Below thread is explaining a bit about this, I would appre...
2014/05/13
[ "https://Stackoverflow.com/questions/23630928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/751971/" ]
Solved it this way: Wrap your grid controllers in a parent controller that holds variables for global grid configuration. ``` <div ng-controller="GridGlobals"> <h1>Grid 1</h1> <div ng-controller="MyCtrl1"> <div class="gridStyle" ng-grid="gridOptions1"></div> </div> <h1...
you can refer to this [ng-grid module](http://angular-ui.github.io/ng-grid/) for the grid layout. and yes you can specify with this ng grid module some your global gridding!
23,630,928
I am creating a new application using Angular JS where ng grid used at many pages. I want to enable some global configuration for all the grid so that I can change the look and feel from a common place for all grids like, allow sorting, re-size of columns etc. Below thread is explaining a bit about this, I would appre...
2014/05/13
[ "https://Stackoverflow.com/questions/23630928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/751971/" ]
If you look through the code, you will find: `self.config = $.extend(defaults, window.ngGrid.config, options);` I'm not sure when this was available, but it is available in the latest release at time of writing (2.0.11) at line `1504`. So in your `config` or `run` you can specify: `window.ngGrid.config = { enablePi...
you can refer to this [ng-grid module](http://angular-ui.github.io/ng-grid/) for the grid layout. and yes you can specify with this ng grid module some your global gridding!
23,630,928
I am creating a new application using Angular JS where ng grid used at many pages. I want to enable some global configuration for all the grid so that I can change the look and feel from a common place for all grids like, allow sorting, re-size of columns etc. Below thread is explaining a bit about this, I would appre...
2014/05/13
[ "https://Stackoverflow.com/questions/23630928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/751971/" ]
Solved it this way: Wrap your grid controllers in a parent controller that holds variables for global grid configuration. ``` <div ng-controller="GridGlobals"> <h1>Grid 1</h1> <div ng-controller="MyCtrl1"> <div class="gridStyle" ng-grid="gridOptions1"></div> </div> <h1...
as Lalit Sachdeva said, you have the [Getting Started](http://angular-ui.github.io/ng-grid/) source but you also have their Github [wiki](https://github.com/angular-ui/ng-grid/wiki) page that has more advanced features to offer you like: Configuration Options,Defining Columns,Templating your Rows and Cells,Column Sorti...
23,630,928
I am creating a new application using Angular JS where ng grid used at many pages. I want to enable some global configuration for all the grid so that I can change the look and feel from a common place for all grids like, allow sorting, re-size of columns etc. Below thread is explaining a bit about this, I would appre...
2014/05/13
[ "https://Stackoverflow.com/questions/23630928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/751971/" ]
If you look through the code, you will find: `self.config = $.extend(defaults, window.ngGrid.config, options);` I'm not sure when this was available, but it is available in the latest release at time of writing (2.0.11) at line `1504`. So in your `config` or `run` you can specify: `window.ngGrid.config = { enablePi...
as Lalit Sachdeva said, you have the [Getting Started](http://angular-ui.github.io/ng-grid/) source but you also have their Github [wiki](https://github.com/angular-ui/ng-grid/wiki) page that has more advanced features to offer you like: Configuration Options,Defining Columns,Templating your Rows and Cells,Column Sorti...
28,888,158
I'm trying to edit a text file in Linux. The lines are quite long and vi insists on wrapping the lines. I'd like to see the lines NOT wrapped. I realize I'll have to scroll right and left some but that's okay; the lines are not so wide that this is a big problem. I can't see any options for vi that would make it displa...
2015/03/05
[ "https://Stackoverflow.com/questions/28888158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1234456/" ]
`:h wrap` in vim says `:set nowrap`.
Emacs hash the `visual-line-mode`, which presents the lines as if wrapped, but keeping them long in fact. <https://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html>
763,102
I need to configure programmatic ldap authentication in an application. But I'd rather not hardcode passwords anywhere. So it would be very convenient if ldap servers all have anonymous access for authentication purposes. Being a bit new to ldap, this might look like a silly question.
2016/03/11
[ "https://serverfault.com/questions/763102", "https://serverfault.com", "https://serverfault.com/users/143130/" ]
No you can't rely on anonymous access always being available and your application should also support authentication with what is typically called a *"Bind DN"*. Yes, often that requires storing a cleartext password in the configuration of your application which is not ideal, but it is still fairly common to do so an...
Yes , LDAP supports anonymous read access , but it depends on how it is configured to support this feature. You may configure ldap to have such access on local LAN. If you are not sure , just ask your system administrator. I am using this feature in a Java application , to lookup users in LDAP for authentication.
4,771,267
Hey guys, this is my first time using jQuery. I'm working on a simple Twitter app that checks whether a user is following another user, but I'm having trouble picking up on the inputted values in my form. I've got this form on my page: ``` <form id="form_friendship"> Is <input type='text' name='user_a' value='usern...
2011/01/22
[ "https://Stackoverflow.com/questions/4771267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/479703/" ]
Just do: ``` $ ssh -X username@cornell.unix.edu ``` This should launch `ssh` with X forwarding enabled, when run from a terminal emulator like Xterm, gnome-terminal and the like. `username` should be your account name on the remote computer, of course.
Enable X forwarding in PuTTY. Option is in Connection/SSH/Tunnels.
123,217
I've been trying to upgrade my ubuntu 11.04 desktop computer, but when I click on the ugrade button: ![enter image description here](https://i.stack.imgur.com/Tw3EG.jpg) I get this error: I've tryied to change my repositories, but it changes nothing in the error((on the "setting new software channel"). ![enter image...
2012/04/18
[ "https://askubuntu.com/questions/123217", "https://askubuntu.com", "https://askubuntu.com/users/4028/" ]
You need to remove any `jaunty` related repositories from your sources list or sources list.d/\*. The reason I jump straight for jaunty is that in your screenshot, the archives that are failing have `jau` as the start of the distribution name. It may be finding `deb-src http://pt.archive.ubuntu.com/ubuntu/ jaunty-...
Check if you can ping pt.archive.ubuntu.com, if this does not work ... try modifying your ``` /etc/apt/sources.list ``` to remove references for "pt" and leave "archive.ubuntu.com". This will effect your download speed for new installs and updates but it may resolve the issue.
69,237,759
Im currently starting to develop a new project for my masters final thesis which will be a monolith to microservice kinda project ( very briefly ). Since my team already has a defined architecture for all the backend applications ( they are currently monoliths ), is there a way I can "quickly" create a generator with ...
2021/09/18
[ "https://Stackoverflow.com/questions/69237759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16946039/" ]
If I understand your need correctly I think you need a tool to bootstrap your project according to your own architectural design. To do that, personally I use Telosys (<https://www.telosys.org/>). I use it to bootstrap my microservices projects (with SpringBoot + Kubernetes). If you just need a very basic project init...
I would say the solution will depend on what is your "blank base project" structure. I can think of two possibilities that might fit your requirements. If you only need to configure certain aspects of the project, such as its *Maven* coordinates, build tool, java version and *Spring Boot Starters* dependencies, then y...
70,976,319
I'd like to clamp calculations in the range of 0-360 in my program. I know if you have an 8-bit integer adding 255 + 1 will overflow to 0 and likewise, 0 - 1 will underflow to 255. I wrote this function as a test: ``` //only for negative numbers function clampTo360 (a) { if (a < 0) { var b = 361 + a; if (b >...
2022/02/03
[ "https://Stackoverflow.com/questions/70976319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11781037/" ]
These declarations ``` int a[] = {}; int b[] = {}; ``` invoke undefined behavior because you may not declare arrays with the number of elements equal to 0. It seems you are trying to use variable length arrays that is not a standard C++ feature. Nevertheless if the compiler supports this feature then you need at l...
You should declare your arrays a and b like this after the line `cin >> n`: ``` int a[n]; int b[n]; ``` to avoid undefined behavior as Vlad said. Declaring array length like that at runtime isn't standard in c++ so you could instead use a std::vector or malloc like: ``` int n; cin >> n; cout << "\n"; int *a = (in...
53,657,983
I developed a project for automatically sending mails from a specific account using javax.mail service. I developed and tested the application and it seem to work properly at the time but now I get a connection error when I start it. java.net.ConnectException: Connection refused: connect I don't know what happened ...
2018/12/06
[ "https://Stackoverflow.com/questions/53657983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10755204/" ]
Jquery has a `.data()` method built in for either getting or setting values for a data attribute. When this [method is provided with a key](https://api.jquery.com/data/) like `.data(key)` it will return the value stored in the data attribute. So for your particular example it would be `.data('myid')`. For data attribut...
There are several ways. ``` 1. the way to get value $("option").attr("data-myid"); // 123 $("option").dataset.myid; // 123 2. the way to set value $("option").attr("data-myid", "YOUR_VALUE"); // YOUR_VALUE ```
9,977,680
I need to define copybook, describing my file format. In my file, there are rows of different format, but the first part of all rows is the same. How can I define the common structure only once and refer to it from other structures? I need something like this: ``` 01 Header. 02 Id PIC X(2). 02 Name PIC X(10). 01 L...
2012/04/02
[ "https://Stackoverflow.com/questions/9977680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/427598/" ]
I think you might be looking for COBOL REDEFINE. This allows the same data structure to have different internal structures which you may choose among at run-time. For example: ``` 01 TRANSACTION. 05 TRANS-SQNBR PIC 9(5). 05 TRANS-TIMESTAMP PIC X(26). 05 TRANS-TYPE ...
You can use the IN keyword (or its synonym OF) to refer to structure members with identical names in different structures. ``` 05 FORMAT-CODE PIC X(1). 88 FORMAT-IS-CUSTOMER VALUE "C". 88 FORMAT-IS-EMPLOYEE VALUE "E". 05 CUSTOMER-LAYOUT. 07 FIRST-NAME PIC X(1...
17,568,480
I browsed some books about quantum computers and there is some concepts from computer science (for example, Turing machine) except quantum physics and mathematics. So, if I want to study quantum computing what I should know from computer science? Is it useful to read SICP, for example?
2013/07/10
[ "https://Stackoverflow.com/questions/17568480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2422265/" ]
Chapters 2 and 3 of [Nielsen and Chuang](https://rads.stackoverflow.com/amzn/click/com/1107002176) should give you the background you need. [The Feynman Lectures on Computation](https://rads.stackoverflow.com/amzn/click/com/0738202967) provides an easy to understand introduction to CS for physicists. Beyond that, yo...
Theory of computation is the basic science and mathematics behind computer science. It's the theory of computing machines, read up on complexity classes and some basic algorithms. I don't however see the need to go too deep into it, quantum computing is more in the domain of physics than computer science. Look for a bo...
17,568,480
I browsed some books about quantum computers and there is some concepts from computer science (for example, Turing machine) except quantum physics and mathematics. So, if I want to study quantum computing what I should know from computer science? Is it useful to read SICP, for example?
2013/07/10
[ "https://Stackoverflow.com/questions/17568480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2422265/" ]
Chapters 2 and 3 of [Nielsen and Chuang](https://rads.stackoverflow.com/amzn/click/com/1107002176) should give you the background you need. [The Feynman Lectures on Computation](https://rads.stackoverflow.com/amzn/click/com/0738202967) provides an easy to understand introduction to CS for physicists. Beyond that, yo...
All you really need to know from CS is how to count in binary and use bitwise operators, really stuff you could just glean from a Wikipedia article. It would also be helpful to learn some basic discrete math to evaluate the efficiency of algorithms. However, a CS course in algorithms would't be that helpful beyond comp...
45,535,755
Im trying to define the polymorphic type of the following function: ``` flip f x y = f y x ``` My thought was the following: 1. 1st parameter of `flip`, **`f`** takes two arguments so `(t1 -> t2 -> t3)` 2. 2nd parameter of `flip`, **`x`** is of type **`t1`** because of the parameter **`t1`** inside **`f`** function...
2017/08/06
[ "https://Stackoverflow.com/questions/45535755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8224815/" ]
Your **second assumption is wrong**: > > ~~2nd parameter of flip, x is of type t1 because of the parameter t1 inside f function.~~ > > > Let us first analyze the function: ``` flip f x y = f y x ``` We see that `flip` has three arguments in the head. So we first make the type: ``` flip :: a -> (b -> (c -> d))...
This is just a matter of solving a system of equations. First, assign unknown types: ``` f : a1 x : a2 y : a3 ``` Next, `f` is applied to `y`. So, `f` must be a function type with argument of the same type as y, that is ``` f : a1 = a3 -> a4 f y : a4 ``` Similarily, `f y` is applied to `x`, so ``` f y : a4 = a2 ...
34,336,239
I'm testing my project on MotoG (Lollipop 5.1) and a have problem that didn't have on XperiaT2 (KitKat 4.4). The error log is: ``` java.lang.NoClassDefFoundError: android.support.design.internal.NavigationMenuItemView at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Cl...
2015/12/17
[ "https://Stackoverflow.com/questions/34336239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2350960/" ]
Maybe you could try the following code and try again: ``` ./gradlew clean ``` Or this: ``` gradle clean ``` According to some links I search around, may these do some tricks for you.
Try a solution (I've added below) from: [NoClassDefFoundError: android.support.v7.internal.view.menu.MenuBuilder](https://stackoverflow.com/questions/24809580/noclassdeffounderror-android-support-v7-internal-view-menu-menubuilder?answertab=votes#tab-top) > > EDIT: > > > The solution that worked for me was (Using Pr...
37,171,117
I have two different lists that contain integers and I need to constantly find the two smallest values between these two lists; I should note that I do NOT want to merge these two lists together, since they are different types. I would like to know if my approach is good or bad. If it is bad, please let me know how I ...
2016/05/11
[ "https://Stackoverflow.com/questions/37171117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5447028/" ]
Finding a min in `List` can be done in linear time without any sorting. Sorting and finding the min every time will be `O(m*nlgn)` m being the number of iterations and n the size of the list) . A better way would to use `PriorityQueue` (min-heap) where the min is always on the top of the heap instead of sorting on eve...
Although this would definitely work, the task of keeping the lists sorted at all times should be a reason for concern: * If your lists allow random access (i.e. `ArrayList`s), then the process of deleting from them costs you O(n) * If your lists allow O(1) deletions (i.e. `LinkedList`s), then the process of finding th...
37,171,117
I have two different lists that contain integers and I need to constantly find the two smallest values between these two lists; I should note that I do NOT want to merge these two lists together, since they are different types. I would like to know if my approach is good or bad. If it is bad, please let me know how I ...
2016/05/11
[ "https://Stackoverflow.com/questions/37171117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5447028/" ]
Finding a min in `List` can be done in linear time without any sorting. Sorting and finding the min every time will be `O(m*nlgn)` m being the number of iterations and n the size of the list) . A better way would to use `PriorityQueue` (min-heap) where the min is always on the top of the heap instead of sorting on eve...
Why don't you keep your min values in variables instead of keeping sorted lists? ``` List<Integer> list1, list2; int min1 = Integer.MAX_VALUE, min2 = Integer.MAX_VALUE; void setMin(int newValue) { if (newValue < min1) { min1 = newValue; } else if (newValue < min2) { min2 = newValue; } } v...
37,171,117
I have two different lists that contain integers and I need to constantly find the two smallest values between these two lists; I should note that I do NOT want to merge these two lists together, since they are different types. I would like to know if my approach is good or bad. If it is bad, please let me know how I ...
2016/05/11
[ "https://Stackoverflow.com/questions/37171117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5447028/" ]
Although this would definitely work, the task of keeping the lists sorted at all times should be a reason for concern: * If your lists allow random access (i.e. `ArrayList`s), then the process of deleting from them costs you O(n) * If your lists allow O(1) deletions (i.e. `LinkedList`s), then the process of finding th...
Why don't you keep your min values in variables instead of keeping sorted lists? ``` List<Integer> list1, list2; int min1 = Integer.MAX_VALUE, min2 = Integer.MAX_VALUE; void setMin(int newValue) { if (newValue < min1) { min1 = newValue; } else if (newValue < min2) { min2 = newValue; } } v...
43,791
There are many characters that have the initial "m-" and contain "少" as a phonetic element at the same time, such as 妙, 秒, 眇, 竗, etc. I thought this was a good reason to judge that "少" used to have "m"(either voiced or voiceless) in Old Chinese. Then I looked up through B-S's reconstruction. They reconstructed it as /\...
2021/05/02
[ "https://chinese.stackexchange.com/questions/43791", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/26812/" ]
1. Baxter–Sagart's (2014:135) view on \*s.t-: > > Preinitial \*s- had a range of effects on unaspirated stops and affricates . . . Old Chinese \*s.t-, but not \*s.tʕ-, evolves to MC *sy-* (plausibly [ɕ]), presumably through an intermediate stage [stɕ] that simplified to the Middle Chinese palatal fricative *sy-* unde...
I'm not a linguist, but the phonetic element should have some validity, some characters used as indicator of phonetic in a compound character. Only that you listed a limited amount of letters and got the conclusion. The phonetic 少 indicates pronunciation of 'ao' instead of 'm', the letters you listed read 'miao', thoug...
43,791
There are many characters that have the initial "m-" and contain "少" as a phonetic element at the same time, such as 妙, 秒, 眇, 竗, etc. I thought this was a good reason to judge that "少" used to have "m"(either voiced or voiceless) in Old Chinese. Then I looked up through B-S's reconstruction. They reconstructed it as /\...
2021/05/02
[ "https://chinese.stackexchange.com/questions/43791", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/26812/" ]
1. Baxter–Sagart's (2014:135) view on \*s.t-: > > Preinitial \*s- had a range of effects on unaspirated stops and affricates . . . Old Chinese \*s.t-, but not \*s.tʕ-, evolves to MC *sy-* (plausibly [ɕ]), presumably through an intermediate stage [stɕ] that simplified to the Middle Chinese palatal fricative *sy-* unde...
Some dialect(Wenzhou Hua 温州话/one of the Wu yu 吴语)(and i’m one of thoes who speaks 温州话)was able to retain ancient pronunciations, in such dialect 少 is pronounced between xié and xué,or mixed。 温州话 is somewhat related to official spoken language in Song Dynasty 宋代。 > > 温州方言发端于唐,成熟于宋,现在的温州话是当时士大夫所说的汉语 > > > Whenzhou d...
43,791
There are many characters that have the initial "m-" and contain "少" as a phonetic element at the same time, such as 妙, 秒, 眇, 竗, etc. I thought this was a good reason to judge that "少" used to have "m"(either voiced or voiceless) in Old Chinese. Then I looked up through B-S's reconstruction. They reconstructed it as /\...
2021/05/02
[ "https://chinese.stackexchange.com/questions/43791", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/26812/" ]
Some dialect(Wenzhou Hua 温州话/one of the Wu yu 吴语)(and i’m one of thoes who speaks 温州话)was able to retain ancient pronunciations, in such dialect 少 is pronounced between xié and xué,or mixed。 温州话 is somewhat related to official spoken language in Song Dynasty 宋代。 > > 温州方言发端于唐,成熟于宋,现在的温州话是当时士大夫所说的汉语 > > > Whenzhou d...
I'm not a linguist, but the phonetic element should have some validity, some characters used as indicator of phonetic in a compound character. Only that you listed a limited amount of letters and got the conclusion. The phonetic 少 indicates pronunciation of 'ao' instead of 'm', the letters you listed read 'miao', thoug...
23,895,176
How to access navigator.plugins object in main.js file? I use a Firefox Add-on SDK. ​
2014/05/27
[ "https://Stackoverflow.com/questions/23895176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3206791/" ]
You need to close `writer` instead of `output`. The `BufferedWriter` may not be writing all of the lines, and won't since you never close it.
You have to close the writer object. The last couple lines probably haven't been flushed onto the text file. In addition, are you aware of the try-with-resource introduced in Java 7? You can condense your code to this by utilizing it: ``` public String readFile(){ String fileName = "/home/anand/Desktop/index.t...
7,256,103
I juste figured out that I can't release the variables I set in my appDelegate from other class. Example : I have a class `myClass`. ``` In myClass.m if I do : appDelegate = [[UIApplication sharedApplication] delegate]; appDelegate.aString = [[NSString alloc] init]; //aString is declared and synthesized...
2011/08/31
[ "https://Stackoverflow.com/questions/7256103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/864954/" ]
What are the attributes for the property `aString`? It's likely that you're using a `retain` property, which will (as the name suggests) retain the underlying object upon assignment. Therefore, after the assignment to `appDelegate.aString`, you've got an `NSString` with a retain count of at least 2. Your `NSLog` after ...
You should use the "Analyse" system built into [XCode](http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Debugging/Debugging.html). **shift ⌘ a - Build and Analyze.** It will show you with nice blue arrows where you retain, release and overretain/overrelase variables.
7,256,103
I juste figured out that I can't release the variables I set in my appDelegate from other class. Example : I have a class `myClass`. ``` In myClass.m if I do : appDelegate = [[UIApplication sharedApplication] delegate]; appDelegate.aString = [[NSString alloc] init]; //aString is declared and synthesized...
2011/08/31
[ "https://Stackoverflow.com/questions/7256103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/864954/" ]
You are not using properties correctly. Your code should read: ``` appDelegate = [[UIApplication sharedApplication] delegate]; appDelegate.aString = [NSString stringWithString:@"test"]; // This will be retained by your appDelegate appDelegate.aString = nil; // This will cause your appDelegate to release the variable ...
You should use the "Analyse" system built into [XCode](http://developer.apple.com/library/mac/#documentation/ToolsLanguages/Conceptual/Xcode4UserGuide/Debugging/Debugging.html). **shift ⌘ a - Build and Analyze.** It will show you with nice blue arrows where you retain, release and overretain/overrelase variables.
28,992,217
so i'm having a problem receiving intent from one of my services. I have been searching where the problem occur exactly and found that it occurs when the "TimerService" tries to broadcast the intent to the MainAcivity's fragment class. Here is the MainActicity class: ``` package com.exotics.buses; import android.anno...
2015/03/11
[ "https://Stackoverflow.com/questions/28992217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1169650/" ]
You are not giving us much to go on, but heres a way you could do it with generally any text editor that support Find and Replace: Search for the string `<a href="` and replace it with `<a rel="nofollow" href="`. That should sort most of the links on your page that are correctly structured. This is not the best way (y...
You might need to add in a jQuery script reference in your page if it is not there already for this solution, but this will add rel="nofollow" to every `<a>` link on the current page. Included is Google's hosted jQuery library: ``` <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script...
4,486,290
I'm trying to encrypt the connection strings in my web.config. I'm following the instructions from [Walkthrough: Creating and Exporting an RSA Key Container](https://msdn.microsoft.com/en-us/library/2w117ede.aspx). However, when I get to the part with the command: ``` aspnet_regiis -pe "connectionStrings" -app "/MyApp...
2010/12/20
[ "https://Stackoverflow.com/questions/4486290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/497841/" ]
Did you add the MyApplication folder as a virtual directory in IIS under the default web site? That seems to be what it's looking for, not a folder path... According [to this MSDN post](http://msdn.microsoft.com/en-us/library/zhhddkxy%28v=vs.100%29.aspx), you can use `-site` to define the site to target. An excerpt fr...
/MyApplication is a virtual path and the message seems to indicate that path is not available i.e. there is no <http://localhost/MyApplication>. Did you forget to create virtual directory for your app in IIS?
4,486,290
I'm trying to encrypt the connection strings in my web.config. I'm following the instructions from [Walkthrough: Creating and Exporting an RSA Key Container](https://msdn.microsoft.com/en-us/library/2w117ede.aspx). However, when I get to the part with the command: ``` aspnet_regiis -pe "connectionStrings" -app "/MyApp...
2010/12/20
[ "https://Stackoverflow.com/questions/4486290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/497841/" ]
Thanks for your answers. Turned out I needed to run the command prompt as "Administrator"
Did you add the MyApplication folder as a virtual directory in IIS under the default web site? That seems to be what it's looking for, not a folder path... According [to this MSDN post](http://msdn.microsoft.com/en-us/library/zhhddkxy%28v=vs.100%29.aspx), you can use `-site` to define the site to target. An excerpt fr...
4,486,290
I'm trying to encrypt the connection strings in my web.config. I'm following the instructions from [Walkthrough: Creating and Exporting an RSA Key Container](https://msdn.microsoft.com/en-us/library/2w117ede.aspx). However, when I get to the part with the command: ``` aspnet_regiis -pe "connectionStrings" -app "/MyApp...
2010/12/20
[ "https://Stackoverflow.com/questions/4486290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/497841/" ]
Thanks for your answers. Turned out I needed to run the command prompt as "Administrator"
/MyApplication is a virtual path and the message seems to indicate that path is not available i.e. there is no <http://localhost/MyApplication>. Did you forget to create virtual directory for your app in IIS?
11,541,209
sorry to be a pain, but I've been on this one too long and I am sure it's a easy one but I am tired and can't see it. All works fine but the 'String result' is empty ``` package com.example.me; import java.util.ArrayList; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; impor...
2012/07/18
[ "https://Stackoverflow.com/questions/11541209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835035/" ]
You are dealing with an issue in scope. In javascript: ``` function foo() { var greet = "hi"; } function bar() { console.log(greet); // will throw error } ``` However: ``` var greet; function foo() { greet = "hi"; } function bar() { console.log(greet); // will log "hi" } ``` You must define your...
I don't think you can guarantee the order in which handlers will be fired, which means that the document ready may be fired in different order than you expect. Is the variable you are trying to access in the second file a global variable? Try to think about your variables scope as I would have thought this is the issue...
11,541,209
sorry to be a pain, but I've been on this one too long and I am sure it's a easy one but I am tired and can't see it. All works fine but the 'String result' is empty ``` package com.example.me; import java.util.ArrayList; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; impor...
2012/07/18
[ "https://Stackoverflow.com/questions/11541209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835035/" ]
You are dealing with an issue in scope. In javascript: ``` function foo() { var greet = "hi"; } function bar() { console.log(greet); // will throw error } ``` However: ``` var greet; function foo() { greet = "hi"; } function bar() { console.log(greet); // will log "hi" } ``` You must define your...
You cannot guarantee that one file will be loaded before the other. And you cannot guarantee that document.ready in one file will fire before the other. Therefore, I suggest you wrap your code in functions and call them in a single document.ready handler in the order you need. For example: ``` function initVariables...
22,703
I notice a strange behavior of ms project when I use leveling resource. For example, I split the work of my team into two main activity (main task1, main task2); I added 6 task each of a duration of 3 days each. Then I add the project start date, for example, October 8, I assign a resource to the tasks, and I level m...
2017/10/29
[ "https://pm.stackexchange.com/questions/22703", "https://pm.stackexchange.com", "https://pm.stackexchange.com/users/30299/" ]
1. Things to remember: a. Status Date is not a Data Date. It NEVER enters directly into the scheduling or leveling calculations. b. In MSP, the only way to force un-started tasks to start after the Status Date, if it is not otherwise delayed by logic or leveling, is to impose a constraint. c. By default, when updati...
There is no way that I know of to always only level from the status date. But in the leveling options, you can set the date range in which you want to level your project. The default is "entire project", with this option the leveling will spread the tasks over the complete project duration. Pick a fixed date range to a...
7,612
Sometimes when there are no clearly optimal moves, a computer or a human master player would push their pawns on `a` and `h` files (the edges of the board), for no clear reasons. What would be the motivations behind such moves?
2014/10/15
[ "https://chess.stackexchange.com/questions/7612", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4049/" ]
The question is extremely open, as these pawns may be moved for many reasons depending on the position you are facing. In a general sketch, you may consider five kind of `a` and `h` pawn moves: 1. To create some luft for the king, that is, avoid once and for all the back rank threats. ``` [FEN "r5k1/5ppp/8/8/8/8/5PPP...
@pablo has listed some of the common motivations for moving rook pawns. I will mention some **uncommon** but interesting ones. I have used all of these in real games. 1. Set up a **queen trap** to develop a bishop. ``` [FEN ""] 1. e3 e5 2. Qf3 d5 3. Nc3 Nf6 4. d4 e4 5. Qg3 h6 $1 (5... Bd6 $6 6. Qxg7 Rg8 7. Qh6...
7,612
Sometimes when there are no clearly optimal moves, a computer or a human master player would push their pawns on `a` and `h` files (the edges of the board), for no clear reasons. What would be the motivations behind such moves?
2014/10/15
[ "https://chess.stackexchange.com/questions/7612", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4049/" ]
The question is extremely open, as these pawns may be moved for many reasons depending on the position you are facing. In a general sketch, you may consider five kind of `a` and `h` pawn moves: 1. To create some luft for the king, that is, avoid once and for all the back rank threats. ``` [FEN "r5k1/5ppp/8/8/8/8/5PPP...
And sometimes it can just be a bad move. One example worth remembering. With Black pawns on f7, g7, h6, a White Knight on f5 cannot easily be driven away by ..g6.
7,612
Sometimes when there are no clearly optimal moves, a computer or a human master player would push their pawns on `a` and `h` files (the edges of the board), for no clear reasons. What would be the motivations behind such moves?
2014/10/15
[ "https://chess.stackexchange.com/questions/7612", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/4049/" ]
@pablo has listed some of the common motivations for moving rook pawns. I will mention some **uncommon** but interesting ones. I have used all of these in real games. 1. Set up a **queen trap** to develop a bishop. ``` [FEN ""] 1. e3 e5 2. Qf3 d5 3. Nc3 Nf6 4. d4 e4 5. Qg3 h6 $1 (5... Bd6 $6 6. Qxg7 Rg8 7. Qh6...
And sometimes it can just be a bad move. One example worth remembering. With Black pawns on f7, g7, h6, a White Knight on f5 cannot easily be driven away by ..g6.
28,378,839
Why this works when I launch from nodejs: ``` var a = function (name) { return "Hello, " + name.toUpperCase(); }; var result = a("bob"); console.log(result) ``` But this: ``` var A = (function () { function A(msg) { this.msg = " "; this.msg = msg; } A.prototype.hello = funct...
2015/02/07
[ "https://Stackoverflow.com/questions/28378839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369759/" ]
Well, I've figured it out. It seems that `DifferentFirstPageHeaderFooter` does NOT apply only to the section you set it on, but to every section. Once I set it appropriately on each section both of my problems were solved, and the headers and footers showed up where I wanted. Here's the updated code. ``` Section secti...
`DifferentFirstPageHeaderFooter` is what you need. Probably your code is not correct - and yes, we want to see some code. How can we help you without seeing your code? Many sections with one page per section would work - but that's not how MigraDoc is meant to be used.
4,077,750
I have recently deployed a Symfony 1.3.6 website. I have chosen to keep frontend\_dev.php on the server, so I can debug on the local machine when absolutely required. I modified frontend\_dev.php like this: ``` <?php require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = Proje...
2010/11/02
[ "https://Stackoverflow.com/questions/4077750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461722/" ]
`sfConfig::set('sf_web_debug', false);`
You're initializing the configuration in a dev environment with debug turned on. Try something like: ``` // this check prevents access to debug front controllers that are deployed by accident to production servers. // feel free to remove this, extend it or make something more sophisticated. if (!in_array(@$_SERVER['RE...
4,077,750
I have recently deployed a Symfony 1.3.6 website. I have chosen to keep frontend\_dev.php on the server, so I can debug on the local machine when absolutely required. I modified frontend\_dev.php like this: ``` <?php require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = Proje...
2010/11/02
[ "https://Stackoverflow.com/questions/4077750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461722/" ]
Wouldn't you just want to turn it off in the `settings.yml` file? ``` dev: .settings: web_debug: false ```
You're initializing the configuration in a dev environment with debug turned on. Try something like: ``` // this check prevents access to debug front controllers that are deployed by accident to production servers. // feel free to remove this, extend it or make something more sophisticated. if (!in_array(@$_SERVER['RE...
46,834
I've a Nikon P330. Its USB charger is 5V/550mA and the manual says the following about charging the battery inserted in the camera through USB: > > About 4 hours and 30 minutes are required to charge a fully exhausted battery. > > > Will it be faster if I buy and use a 5V/2A USB charger?
2014/01/13
[ "https://photo.stackexchange.com/questions/46834", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/25346/" ]
The Nikon P330 camera uses a Nikon EN-EL12 1050 mAh battery. EN-EL12 battery capacity is nominally 1050 mAh as supplied. After market batteries may claim higher capacities and, regardless of label, may have lower capacities. If the charge rate is not limited by the camera itself when in-camera charging, or when...
It's possible, but unlikely. The USB 2.0 (maybe 2.1?) standard specifies 500 mA max standard current. If the camera came with a 500 mA charger (the extra 50 mA is likely just a bit of available overhead), then the in-camera charging-circuitry is most likely set to max out at 500 mA, as per the standard. There are a f...
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
You'll get this error if you try to use a Git command when your current working directory is not within a Git repository. That is because, by default, Git will look for a `.git` repository directory (inside of the project root?), as pointed out by [my answer to "Git won't show log unless I am in the project directory"]...
Happened to me when my client Smartgit put a newline in my .git/HEAD file. Deleting the empty line fixed it.
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
If you run the > > git status > > > and viewing the files are downloaded and then deleted or rejected ,start to check this ways step by step and in every part check the directory again: ``` 1- git init (perhaps you have not the right git directory) 2- git status (see where are you and what happened in clon...
**restore the `.git/ORIG_HEAD` and other root .git repo files** I got this error after restoring from backup, apparently the files contained in the .git directory root didn't make it to the target,but all the subfolders did so at first I thought the repo was intact. I fixed it by restoring the root files.
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
Did you init a local Git repository, into which this remote is supposed to be added? Does your local directory have a `.git` folder? Try `git init`.
Probably too late but Another solution that might help future visitors. First delete the old `.git` directory - ``` rm .git ``` Then initialize the git repo again ``` git init ``` NB: The first step does destroy all git metadata saved locally on your device and git starts "afresh" so only turn to this answer as a...
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
Below error seems like Gits didn't find .git file in current directory so throwing error message. Therefore change to directory to repository directory where you have checkout the code from git and then run this command. * $ git checkout
**restore the `.git/ORIG_HEAD` and other root .git repo files** I got this error after restoring from backup, apparently the files contained in the .git directory root didn't make it to the target,but all the subfolders did so at first I thought the repo was intact. I fixed it by restoring the root files.
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
I just had re-initialize git in my directory ``` git init ``` and it worked
This may also be due to permissions. Check the owner / group permissions and make sure you have adequate permissions to access that data. In my case, I came across this error when running "git status" in a repo whose ownership was set to root:root. Running "git status" as root solved my issue. Alternatively, if you don...
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
My problem was that for some hiccups with my OS any command on my local repository ended with "fatal: Not a git repository (or any of the parent directories): .git", with fsck command included. The problem was **empty HEAD file**. I was able to find actual branch name I've worked on in .git/refs/heads and then I did ...
I had this issue with the Jenkins Git plugin after authentication issues with GitLab. Jenkins was reporting 'hudson.plugins.git.GitException:[...]stderr: GitLab: The project you were looking for could not be found. fatal: Could not read from remote repository.' However if I did a 'git clone' or 'git fetch' direct from...
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
My problem was that for some hiccups with my OS any command on my local repository ended with "fatal: Not a git repository (or any of the parent directories): .git", with fsck command included. The problem was **empty HEAD file**. I was able to find actual branch name I've worked on in .git/refs/heads and then I did ...
Go to your source folder where local repo is stored , example mine is found in c:/GitSource , right click while in the folder , click git bash here , then git status....
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
My problem was that for some hiccups with my OS any command on my local repository ended with "fatal: Not a git repository (or any of the parent directories): .git", with fsck command included. The problem was **empty HEAD file**. I was able to find actual branch name I've worked on in .git/refs/heads and then I did ...
This may also be due to permissions. Check the owner / group permissions and make sure you have adequate permissions to access that data. In my case, I came across this error when running "git status" in a repo whose ownership was set to root:root. Running "git status" as root solved my issue. Alternatively, if you don...
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
I had the same problem while i try any git -- commands (eg git status) using windows cmd. so what i do is after installing git for window <https://windows.github.com/> in the environmental variables, add the class path of the git on the "PATH" varaiable. usually the git will installed on `C:/user/"username"/appdata/loc...
git was working fine for be and all of sudden it started showing this `fatal: Not a git repository (or any of the parent directories): .git` message. For me not sure what was corrupted in .git folder, I did `git clone ** newfolder` and copied the entire .git folder to my corrupted/old folder where I was making change...
4,630,704
I am following [this tutorial](http://hayley.ws/2010/12/04/getting-jekyll-running.html). Everything works fine until I run this on my local machine (after replacing the `$VARIABLE`s with their actual values): ``` git remote add nfsn ssh://$USERNAME@$SERVER/home/private/git/$REPONAME.git ``` I receive the following e...
2011/01/07
[ "https://Stackoverflow.com/questions/4630704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/498656/" ]
It seems like you are not going to your specific folder. For example, if I am working on a project named bugsBunny and it is saved in the folder d:/work:code , so first you have to go to that folder using cd d:/work/code/bugsBunny , then after that you can continue using your git commands.
I know there are a lot many answer already, but if you modified a bunch of files, and you are still afraid of losing the work. Note: most of above solutions did not work for me. i faced the same issue , so i did a workaround. ``` git clone <same project> git checkout <to desired branch>//changed to respective branch...
14,655,090
I have a script which runs at server as cron job to download files using `ncftpget`. It fails. I tried to investigate and found that the following command does not work : ``` ncftpget -v -E ftp://ftp.anexample.org/d1/d2/list ``` It says (very similar to): ``` ncftp : Server said : Cannot connect to port XXXX : Con...
2013/02/01
[ "https://Stackoverflow.com/questions/14655090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2033933/" ]
The command should be ncftpget -v -E ftp.anexample.org/d1/d2/list
Are you able to make a manual connection with the ncftp client itself (instead of the automated ncftpget)? Have you checked the obvious - like ensuring that ftp.anexample.org is online, AND that you can connect to the appropriate TCP port? (Try "telnet ftp.anexmple.org 21")? It smells like a firewall issue - perhaps ...
14,655,090
I have a script which runs at server as cron job to download files using `ncftpget`. It fails. I tried to investigate and found that the following command does not work : ``` ncftpget -v -E ftp://ftp.anexample.org/d1/d2/list ``` It says (very similar to): ``` ncftp : Server said : Cannot connect to port XXXX : Con...
2013/02/01
[ "https://Stackoverflow.com/questions/14655090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2033933/" ]
The command should be ncftpget -v -E ftp.anexample.org/d1/d2/list
I know this post is old, but I found it when Googling, so I'm going to add my comment. I had a similar problem, and it's clearly related to my own firewall. Turning it off and trying the command fixed it. Now I just need to find a better solution. Interesting read: <https://www.ncftp.com/ncftpd/doc/misc/ftp_and_firewa...
17,176,287
I'm brand new to Ruby on Rails and I'm having a heck of a time making sense of my associations. At my company we rent out Scanner Packs that include scanners and servers. When we receive a request for a scanner pack, ideally I'd create a new scanner package with the customer info and attach however many scanners and...
2013/06/18
[ "https://Stackoverflow.com/questions/17176287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2162750/" ]
User education with a 2x4 clue-stick should be the first choice. For a technological solution you could prevent them from making such commits locally with a suitable commit hook. However, they probably would fail to install the hook as well. So you are left with implementing a hook that rejects their pushes. You can do...
Submodules (as proposed in the comment) is an option, but that won't prevent the user from creating `a/a`, it could just prevent him from pushing in unrelated directories. You can make a git hook that check that no files is placed inside the folder `a/a/` and reject the push if that happen. Checkout git hooks over the...
17,176,287
I'm brand new to Ruby on Rails and I'm having a heck of a time making sense of my associations. At my company we rent out Scanner Packs that include scanners and servers. When we receive a request for a scanner pack, ideally I'd create a new scanner package with the customer info and attach however many scanners and...
2013/06/18
[ "https://Stackoverflow.com/questions/17176287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2162750/" ]
User education with a 2x4 clue-stick should be the first choice. For a technological solution you could prevent them from making such commits locally with a suitable commit hook. However, they probably would fail to install the hook as well. So you are left with implementing a hook that rejects their pushes. You can do...
This would accomplish preventing creation of a subdirectory `a`, but it's not ideal, and the better answer is probably training: ``` ln -s . a git add a git commit -m "Create top-level self-referential symlink to stifle subdirectory creation" ```
9,110,141
How can i read a barcode from an image in VB.Net? Can I find a free dll or ocx for this work?
2012/02/02
[ "https://Stackoverflow.com/questions/9110141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1184743/" ]
The Open Source [ZXing](http://code.google.com/p/zxing/) is probably your best bet for simple, clean images. There is a [.Net port](http://nuget.org/packages/ZXing.Net) available through Nuget. If your image has distortions (which are common from scanning, faxing, or cameras) then you'll need a commercial solution to...
I've used that one: <http://www.codeproject.com/Articles/12803/Read-Barcodes-from-an-Image> a few years ago... maybe it's helpful for your problem..
9,110,141
How can i read a barcode from an image in VB.Net? Can I find a free dll or ocx for this work?
2012/02/02
[ "https://Stackoverflow.com/questions/9110141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1184743/" ]
The Open Source [ZXing](http://code.google.com/p/zxing/) is probably your best bet for simple, clean images. There is a [.Net port](http://nuget.org/packages/ZXing.Net) available through Nuget. If your image has distortions (which are common from scanning, faxing, or cameras) then you'll need a commercial solution to...
I found this (old) article: <http://www.codeproject.com/Articles/12803/Read-Barcodes-from-an-Image> There is non explicit licence, contact the developer. One time I used a commercial licence of Neodynamic Barcode, <http://www.neodynamic.com/Products/Barcode-NET-SDK/Barcode-NET-VB-CSharp-SDK.aspx?tabid=104&prodid=10> ...
9,110,141
How can i read a barcode from an image in VB.Net? Can I find a free dll or ocx for this work?
2012/02/02
[ "https://Stackoverflow.com/questions/9110141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1184743/" ]
The Open Source [ZXing](http://code.google.com/p/zxing/) is probably your best bet for simple, clean images. There is a [.Net port](http://nuget.org/packages/ZXing.Net) available through Nuget. If your image has distortions (which are common from scanning, faxing, or cameras) then you'll need a commercial solution to...
There are several good projects on codeplex: <http://www.codeplex.com/site/search?query=barcode&ac=8>
76,721
For some years I thought that, over in England, any woman with that name was always eye-REE-nee (like the second principle character of the *Forsyte Saga* by John Galsworthy), and never eye-REEN. Now I'm watching this super-popular *Sherlock* series (my friends made me; it ain't my fault; I don't watch TV) ... you kno...
2015/12/23
[ "https://ell.stackexchange.com/questions/76721", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/27173/" ]
Some names have the same spelling and yet are pronounced differently. Some names have the same pronunciation but the spellings may differ. Consider my name. *"VARUN"*. Now this name can be pronounced in so many different ways (it is really annoying when you live in a country with so many dialects and accents). My name ...
[In the Jeremmy Brett version of the Scandal of Bohemia,](https://www.youtube.com/watch?v=ZaDfTP7zohQ)(English), the king is pronouncing her name "I-ri-na Ahdler". ( from 13:45~ ). So at least Brits in 90's pronounced ( or considered ) so. Here we need to take into account **the king itself is not English ( or Britis...
76,721
For some years I thought that, over in England, any woman with that name was always eye-REE-nee (like the second principle character of the *Forsyte Saga* by John Galsworthy), and never eye-REEN. Now I'm watching this super-popular *Sherlock* series (my friends made me; it ain't my fault; I don't watch TV) ... you kno...
2015/12/23
[ "https://ell.stackexchange.com/questions/76721", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/27173/" ]
Some names have the same spelling and yet are pronounced differently. Some names have the same pronunciation but the spellings may differ. Consider my name. *"VARUN"*. Now this name can be pronounced in so many different ways (it is really annoying when you live in a country with so many dialects and accents). My name ...
In the radio version of The Adventures of Sherlock Holmes(1940's) both Sherlock and Watson pronounce her name as Irenee, with the long EE sound.
45,218,712
My aim here is to create a HTML form that when you submit 2 numbers they are added together server side in node.js and the answer is displayed in a readonly input field in the same HTML page. At present, my function outputs the answer in a separate page- I don't want to redirect the user, just show the answer on the sa...
2017/07/20
[ "https://Stackoverflow.com/questions/45218712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8326031/" ]
Use Jquery Ajax on client side bodyParser on server side: Client side: ``` <form id="myForm" method="post"> Number 1: <input type="number" id="numa" name="numa" step="any"/><br> Number 2: <input type="number" id="numb" name="numb" step="any"/><br> <input type="number" id="answer" name="answer" readonly/> ...
Use **client side JavaScript** to perform an action when the submit button is clicked and have it retrieve the value rather than redirecting to the `/add` page. The following being the general idea: ``` $("submit").onClick(function(){ $.get("/add", {numa: a, numb: b}, function(err, response, body){ $("answ...
45,218,712
My aim here is to create a HTML form that when you submit 2 numbers they are added together server side in node.js and the answer is displayed in a readonly input field in the same HTML page. At present, my function outputs the answer in a separate page- I don't want to redirect the user, just show the answer on the sa...
2017/07/20
[ "https://Stackoverflow.com/questions/45218712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8326031/" ]
Use Jquery Ajax on client side bodyParser on server side: Client side: ``` <form id="myForm" method="post"> Number 1: <input type="number" id="numa" name="numa" step="any"/><br> Number 2: <input type="number" id="numb" name="numb" step="any"/><br> <input type="number" id="answer" name="answer" readonly/> ...
please check below for your fix <https://stackoverflow.com/a/45235894/3490058> in short you have to disable automatic (native) form submission which you can do by adding onsubmit event and removing button click event as it'll submit your form and give you error from nodejs. ``` <form id="add" method="post" onsubmit="...