How about Create Desktop Application with C++, HTML5, CSS? [closed] - c++

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
i need your suggestions about my idea with my team:
we want to create a platform or let me named it a framework the roll of this "framework" is:
make desktop application so easy and powrfull specially in styles cause it is based on HTML5, css, and the logic side base on c++, we want to create an intermediate tag-language (base on XML namespaces); to create the GUI and to bind the c++ code with, if we create this "framework", how about it's powerfull and usability, ....
we want to create this "framework" cause we are mastered c++, we hate the requirements of .net, java, ..., and we want to use the powerfull of html, css, javascript, c++, the main part in my idea is to make all the of the javascript, css and html under one tag-language 'gml' to make the UI creation and styling animating so easy for developers, ex: in HTML we should type:
<input id="gobutton" type="submit" value="Go!" />
and in css code:
input#gobutton{
cursor:pointer; /*forces the cursor to change to a hand when the button is hovered*/
padding:5px 25px; /*add some padding to the inside of the button*/
background:#35b128; /*the colour of the button*/
-moz-box-shadow: 0 0 4px rgba(0,0,0, .75); ... }
/***NOW STYLE THE BUTTON'S HOVER AND FOCUS STATES***/
input#gobutton:hover, input#gobutton:focus{
background-color :#399630; ....}
and in the framework that we aim to build: we create so easy ex "first view":
<button id="btn" content="Hello" margin="1,5.2,3,6" background="Red" Foreground="White" ... > <Button.HoverStyle>
// here we can make css code or
<CssStyle> .... </CssStyle>
</Button.HoverStyle>
</Button>
this is the firt look on the idea, but we will make it with more care and study.
my question is: how about this idea? and it's usability. I do not have a great view on the web, i think whene i share this idea you will help me to decide. thanks
thanks before ...

Related

What is the use of ToCoveoFieldName method in covoe search in hive framework? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
As of now i am facing some problem with field bind issue while get the response from coveo, inside the this method ToCoveoFieldName is implemented. Any one can help me on this.
Code snippet
raw.<%= ToCoveoFieldName("field Name", false)
Since you are having issues with this call, I am assuming that you might be migrating to the Coveo for Sitecore Hive Framework implementation, which mostly shifted from a back-end implementation to a front-end one for all of its major field logic.
This means that ToCoveoFieldName is not available any more on the server side. Instead, there is a JavaScript implementation of the same logic.
For instance, if you want to translate a field to the Coveo format, you can use CoveoForSitecore.Context.fields.toCoveo("field name").
I can see in your question that you are within a result template, there are already two helpers to get you either the field name or the value.
<div data-field={{= coveoFieldName("field name") }}>
and
<div>{{= coveoFieldValue("field name") }}</div>. (This one is the equivalent of calling raw[coveoFieldName("field name")])
Those helpers are explained in more details in the documentation, on the Editing the Content of a Result Template page (for version 5.0+) and Coveo Fields Resources Component page (for versions <5.0 and 4.1+).

Proper way to change language on website? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm doing a website and would like to include language change. What is the proper way to handle this ? Just copy html's, rename and translate them and change links ? Or is there a better way ? I'm using django.
Edit:
Here are some good tutorials for anyone interested:
Documentation: https://docs.djangoproject.com/en/2.1/topics/i18n/translation/
Easy start: https://phraseapp.com/blog/posts/quick-guide-django-i18n/
Django offers settings to automatically update language options:
https://docs.djangoproject.com/en/2.1/ref/settings/
Django also has a full page on Internationalization (i.e. I18N) and Localization (i.e. L10N):
https://docs.djangoproject.com/en/2.1/topics/i18n/
Several topics are covered, one of which is:
Translation of Text
You will need to update your template files if they are not properly configured for translation:
from django.http import HttpResponse
from django.utils.translation import gettext
def my_view(request):
output = gettext("Welcome to my site.")
return HttpResponse(output)
I suggest you take a look at the option of using google translate to automatically translate your website to every lang https://translate.google.com/manager/website/.
Another option is to add a lang attribute to every text, and having all text a few times for etch lang. then using a javascript script to detect the user's lang like this :
navigator.userLanguage
and removing all text that don't have the right lang attribute.

Create Spotify Playlist from List of Albums [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a long-running list of favorite albums. I know sites like www.spotmysongs.com will take a text file of a list of artists and song titles and create a playlist out of them on Spotify, but I'd like to do the same with a list of albums, without taking the time to list every track on the album.
For example I want to have it say:
Daft Punk Random Access Memories
Cults Cults
and have it load those two whole albums together into a playlist. Any idea if this is possible or how to do it?
You could make a request to http://ws.spotify.com/search/1/album?q=daft%20punk%20random%20access%20memories
http://ws.spotify.com/lookup/1/?uri=spotify:album:4m2880jivSbbyEGAKfITCa&extras=track to get the tracks on that album.
As for programmatically adding them to a playlist, there is currently no official way of doing this. However, here is a hack you can use by opening up the web player in the devtools console. The example code will create a playlist and add a track. You could combine this with the above steps.
window.frames[0].require("$api/models", function(models) {
models.Playlist.create("My cool playlist").done( function(playlist) {
playlist.load("tracks").done( function(){
playlist.tracks.add( models.Track.fromURI("spotify:track:3KRAqo71NrfR1UCa34JEsy").done(function(){
})
})
})
})
You could write a browser extension to do this. Or, supposing you had a large JSON list of tracks that you want to append, you could modify the above example to add all the tracks sequentially.
Alternately, you could try using something like https://github.com/liesen/spotify-api-server, until Spotify gets their act together and gives you an official API.
Thought I would enter a new answer that works better now that the spotify web api is available. You can now make supported API calls to create a playlist and add tracks to a playlist.

How could I allow copy editors for my Django site to create internal links in a DRY manner? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My Django site is an ecommerce store. Relatively nontechnical copy editors will be logging into the Django admin interface and writing the copy for each of the product pages. They have told me that they want to be able to create links in this copy to other pages on the site. For example, if a product references another product in its description, they want to link between the pages.
I see a couple of possible options:
They simply hardcode the urls in <a> tags in the copy. I've set up ckeditor for the admin textareas so this would be the simplest solution, but if the url structure of the site ever changed, (say we changed them for SEO purposes) all the links would break.
Introduce some sort of wiki syntax where they surround the text that they want the links to be in square brackets. Something like:
Widget A works really well with [[Widget B]]. It is good.
would produce:
Widget A works really well with Widget B. It is good.
Then you have the problem of what happens if the product's name changes?
Has anyone dealt with this problem before and come up with a solution that is flexible enough to allow changing links/names/etc?
I deal with this issue frequently. Ultimately, you have to be very persuasive to convince me to allow embedding links directly into the copy--especially with an e-commerce website.
What if the product name changes or is re-branded?
What if the product is discontinued... you don't want 404 errors from your internal links.
Do you really want to lead people away from your "add to cart" call to action that high up on the page?
Do they know your SEO strategy? Are they going to dilute your links? What verbiage will they use? Will they ensure the link is valid?
When I am asked to give copy/product development team the ability to add links I always start with a No. Ask them what they need them for, explain the problems that can arise (eg. extra cost in maintaining valid links, conversion rate considerations, SEO considerations), and offer alternative solutions.
For example, I usually offer the ability to allow them to associate products with products as "Associated Products", "Related Products", "Accessories", "More Information" etc. You can have these in tabs or lists at the bottom of the product page. These would be in models and thus you have control over not displaying discontinued products, the link names are the product names (which you have SEO control over), etc. Determine if they are going for cross-selling, up-selling, or providing the end user with more information.
As a last resort I have also used a custom code parser which is again based on the target object and not a hard-coded link. For example, let's say you give them the ability to do:
Widget A works really well with [product=123].
A custom template tag, parser in your model/view can replace that with a link to the the Product with id=123 (or use slug) based on get_absolute_url(). If the product is discontinued, the name can still show but no link. This only works if you have a policy of never deleting records. Even then, you may have to have some error handling for when they enter an invalid product ID or somebody does delete that product. That will happen.

Joomla template displaying in iframe [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a site that requires an iframe for inserting a reservation widget into a Joomla article. I have no problems displaying the iframe in the article, but the problem is the template is also displaying in the article. It's as if the iframe wraps the entire site inside the article also. I only need the reservation widget to appear. You can see it here http://www.archersinn.com/reservations. The reservations widget is a third party my client uses so I just need to figure out how to display it properly. Any ideas?
You can show only the component using this parameter at the end of your joomla url
?tmpl=component
http://www.archersinn.com/reservations?tmpl=component
But you need to do this before this page.
In the page you insert your code for reservations you have style from Joomla, but is not joomla, I'm right?
In your iframe you are calling an external webpage. If you got control over the look and feel of the external widget site, you may configure that page to look like your current page - http://www.archersinn.com/reservations, with the introduction and title etc.
Instead of linking the menu item reservations to an article within your site, you may consider pointing the menu item to the external site - https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=H4LUxh0dk0&type=raw. Change the menu item type to External Link and set to open it in the parent window.
The iframe is pointing to https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw but that site has made a custom template for you so that it matches the look and feel of your website.
So it's not supposed to be an iframe at all. Just change the URL of the Reservation button to the following and you should be sorted: https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw
Many booking systems do it this way. They have the booking engine on their own system and redirect back to your website at the end of the transaction.