StackOverflow.com

VN:F [1.9.22_1171]
Rating: 9.4/10 (10 votes cast)

Random snippets of all sorts of code, mixed with a selection of help and advice.

About PHP for backend

19 March 2024 @ 1:45 am

Is it good to use PHP for the backend? I'm trying to build a website and I've used PHP for the backend and it's not at all working properly I'm stuck in making the forgot-password page and It's making my life hell even I'm getting depressed with this behavior of PHP and whenever I try to insert some HTML code in PHP code it misbehaves and I'm using an API for sending mail and It's not exactly working whenever I click on submit button it doesn't send mail it directly goes to action page. Please correct me if my code is wrong and if this is the drawback of PHP then please do suggest me some backend languages.Link to code

Add new module with API Pagination to exiting API with query parameter

19 March 2024 @ 1:44 am

I have problem, I have existing code to get data from API with Query Params like no_nspn or postal_code, with the same url : {{url}}/office-member?no_NSPN= or {{url}}/office?postal-code= so my code doing well like this: def __etl(name, uniques=None): """ ETL operation Do ETL on backbone dapodik web service data """ def func(param): assert "period_id" in param N_TRIES_LIMIT = 2 TOTAL_CALL = 0 TOTAL_ROW = 0 engine = db.get_engine("dwh") connection = engine.connect() endpoint = name.replace('_', '-') table_name = name.replace('-', '_') table_schema = 'dwh' # item fetcher fetch_items = [] # fetch using postal_code etl office data if name == "office": postal_code = list(pd.read_sql_query(""" SELECT

Unity problem that wont let me start the game

19 March 2024 @ 1:44 am

JSON parse error: Missing a name for object member. (Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef) ive been trying different things for so long but its not working JSON parse error: Missing a name for object member. (Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef)

Debug.Log not being written to the player.log after the beggining of a Build play time

19 March 2024 @ 1:44 am

I am using Unity to develop my game and I am running in some problems with debugging my builds. I have been trying to find the reason why my Debug.log commands don't seem to be written on my player.log file during my builds. In my editor it works fine, but in the build it runs until a certain point and then it does not log anything else. I am trying to solve this problem for sometime, since I am having some other problems that accour only in my builds and not in the editor and I was trying to debug them. It seems like anything in the Awake method at the first frame of the game is Debuged correctly accorint to my test, anything past the first frame does not get logged. I am running a little bit low on hope for this issue, since I made a post on Unity Forums in october 2023 and dind't got a single responce. I just let this slip and solve other problems in the game, but now I need to solve this no matter what. Any help or insight will be appreciated. Here is

CSVHelper: dynamically write to CSV

19 March 2024 @ 1:43 am

Let's say I have the following interface: public interface IStateInformation { public int TaskId { get; set; } public string Name { get; set; } } and the following class implementing this interface: public class ExternalStateInformation : IStateInformation { public int TaskId { get; set; } public string Name { get; set; } public string External { get; set; } } Now I want to write the following class to a CSV: public class SwitchingData { public string DateTime { get; set; } public int EpisodeId { get; set; } public IStateInformation SourceState { get; set; } public IStateInformation TargetState { get; set; } } As you can see, this class includes IStateInformation objects. When I try to write a record to a CSV file, only the propert

Astra Theme Mobile Menu Pushes Content Downward

19 March 2024 @ 1:42 am

When I tap on the the menu on a mobile device (phone), the menu pushes the content downward. How would I get this so that tapping on the menu just drops down and overlaps the content rather than pushing it downward?

Google chrome's caching behaviours for css sub-resources fetched with `url()`

19 March 2024 @ 1:42 am

CSS looks ordinarily: background-image: url(/path/to.png); Caching on the server side is set to be cache-control: no-cache. All resources are cached as expected (in cache, must revalidate), but sub-resources referred by url(...) in css stylesheets google chrome caches extremely agressively: the browser doesn't revalidate them. That's how the dev tools look like for what I'm talking about: enter image description here Firefox works as expected: every resource is revalidated (and http 304 is returned).

Issue with BERT Preprocessor model in TF2 and python

19 March 2024 @ 1:42 am

I am trying to use BERT to do a text classification project. However I keep running into this error ` ValueError Traceback (most recent call last) Cell In[37], line 4 2 text_input = tf.keras.Input(shape=(), dtype=tf.string, name='text') 3 bert_preprocess = hub.KerasLayer(preprocess_url, name='preprocessing') ----> 4 preprocessed_text = bert_preprocess(text_input) 5 bert_encoder = hub.KerasLayer(encoder_url, 6 trainable=True, 7 name='BERT_encoder') 8 outputs = bert_encoder(preprocessed_text) ValueError: Exception encountered when calling layer 'preprocessing' (type KerasLayer). A KerasTensor is symbolic: it's a placeholder for a shape an a dtype. It doesn't have any actual numerical value. You cannot convert it to a NumPy array. Call arguments received by layer 'preprocessing' (type KerasLayer): • inputs=<KerasTensor shape=(None,),

Clients' Policy Violations Risk for App Store & Google Play

19 March 2024 @ 1:41 am

I have a developer account and have some apps. I'm considering working as a freelancer now. I could have more than 10 clients in a year. If I upload my clients' apps to their developer accounts using my MacBook, and if one of them violate policies in their other apps and their developer accounts are suspended, will my personal developer account be affected negatively? (Because my macbook will be used for app submission, May Apple or Google relate my personal developer account with them?)

How to propagate module augmentation of custom MUI theme inside a component library monorepo?

19 March 2024 @ 1:40 am

In my company, we're building a monorepo of component libraries (no app). In our core package, we're exporting a custom MUI theme with custom brand options (using module augmentation, as per the docs), intended to be used in consumer apps to normalize the company branding and styles all throughout our applications. In another package of the monorepo (let's call it foo), we have a library that exports several components that uses MUI styled components internally, which should make use of our custom MUI theme, since that's the intended way for them to be used. However, because foo package itself doesn't have a direct dependency to the core package, and because there's no app or ThemeProvider involved here, typescript isn't able to guess the custom theme structure we are exporting in the