push

Git : Head commit in remote repository is crap - how exactly should I go about replacing it?

北慕城南 提交于 2019-12-12 05:13:25
问题 Alright - so I had a guy (in a school project - don't panic) commit a full eclipse workspace complete with .class files and .settings/ directories. What I did was to clone the repo and make a .gitignore file and issue : $ git reset --soft HEAD^ $ ... unstaged all files and added .gitignore and all files that it filtered in ... Then I tried : $ git commit -c d1cf2d8173234b444c601d5e294a5cf6d790fa2c Where the SHA is the SHA of the online commit. It won't let me push : Pushing to https:/

Chrome Web Notification Push Unauthorized Registration exception

随声附和 提交于 2019-12-12 04:17:48
问题 I am implementing push notifications from my server to the users who are subscribed to my server. Right now sending the push notifications to Firefox users works like a charm. However, on Chrome I get an Unauthorized Registration error. I am using Django as a backend. In this image are the relevant parts of the error and my code (email edited), aswell as the subscription. If any more information is needed please let me know. Does anyone know why I can't send push notifications on Chrome? And

Android C2DM sender id

大城市里の小女人 提交于 2019-12-12 02:31:05
问题 I've been working with de C2DM for sometime and its has been working perfect. Recently I've bumped into a problem that I can't seem to fix and couldn't anything on this forum that might help. The problem is that I have several apps that use C2DM, I've let all apps register with the same sender id which then registers the users token in my database. The problem if a user has two of my apps A & B (same sender id) and launches app A and I send a push notification to users with app B, user who

Android App crashes when push is received and app is closed

别等时光非礼了梦想. 提交于 2019-12-12 01:44:02
问题 I'm developing an Android & iOS App with cordova. Current Version there is 2.2.0. I've got the following Java code to show the Push Notification: private void putNotification(String title, String message){ try{ Log.w("Push", "putNotification"); MainActivity context = MainActivity.getAppContext(); Log.w("Push", "context is set"); NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); Log.w("Push", "notificationManager is set");

Vector - push_back uses default constructor not copy constructor

…衆ロ難τιáo~ 提交于 2019-12-12 01:11:28
问题 I'm facing the problem of adding new elements to my vector. Let's start with the herarchy Index conatins Companies. Companies contain Stocks Index { ... vector <Company> composition; ... } Company { ... vector <Stock> stocks; ... } Stock { .... } The problem is when I start adding a company with stocks (till this moment everything is ok) to an index Comapny c1(bla bla, some arguments); mindex->composition.push_back(c1); Where "mindex" is defined as Index* mindex=new Index(); I got some memory

nodejs module npm install error / gcm-node module send err

纵饮孤独 提交于 2019-12-12 01:10:10
问题 my ubuntu12.0.4 server, npm install error, please help me https://github.com/ToothlessGear/node-gcm $npm install node-gcm npm install node-gcm npm WARN package.json dateformat@1.0.6-1.2.3 No repository field. npm http GET http://registry.npmjs.org/node-gcm npm http GET http://registry.npmjs.org/node-gcm npm http GET http://registry.npmjs.org/node-gcm npm ERR! network getaddrinfo ENOTFOUND npm ERR! network This is most likely not a problem with npm itself npm ERR! network and is related to

MongoDB does not seem to want to push to array

不羁的心 提交于 2019-12-11 23:21:24
问题 I am making an online shopping cart, and I having huge issues pushing add to cart to items $collection->update( array('session' => $_SESSION["redi-Shop"], array('$push'=> array('items'=> $_POST["item"]) ))); When the customer selects their first item to add to the cart it works fine $collection->insert( array('session' => $_SESSION["redi-Shop"], 'status' => "cart", 'items' =>$_POST['item'])); but after the first item is added it does not allow me to add any more. Please any advice would be

How can i get data to be pushed from the database to the client, like a messenger service?

喜欢而已 提交于 2019-12-11 22:13:25
问题 I am trying to code a messenger service that will store sent messages in a server and then push the message to all devices connected to the server. The messenger will be used in a classroom environment and the messages will never be sent to one individual device. At the moment a message can be sent and stored in the database but the app needs to be refreshed for all the messages to be displayed. A simple way would be to continuously run the stored procedure but that would require extra

Pushing app to heroku error

删除回忆录丶 提交于 2019-12-11 21:11:50
问题 I am getting the following error when I try to push my app to heroku. I saw a similar thread on here, but the issues seemed related to OSX. I am running windows 7 $ git push heroku master Counting objects: 1652, done. Delta compression using up to 4 threads. fatal: object 91f5d3ee9e2edcd42e961ed2eb254d5181cbc734 inconsistent object lengt h (476 vs 8985) error: pack-objects died with strange error error: failed to push some refs to 'git@heroku.com:floating-stone-94.git I'm not sure what this

Push notification if web server goes down

岁酱吖の 提交于 2019-12-11 18:59:33
问题 Is it possible to send a push notification to my Mac and my Android devices if, for example, my WebServer(s) go down, or if a particular script is running? 回答1: I'd recommend to employ CURL utility for such task: http://curl.haxx.se Script it for periodical access to the index of your site (schedulers like CRON, Quartz etc), then parse the response. If web-site is alive, CURL will receive something like "HTTP 1.1 200 OK" header, otherwise you can start your custom logic (script to send SMS,